Automic Workload Automation

  • 1.  Foreach workflow VARA not settable by script

    Posted Apr 30, 2015 08:00 AM
    Hi there

    I'd like to dynamically set the VARA that is used by a FOREACH workflow to iterate trough. Based on the documentation this is the attribute FE_SRC_NAME:
    FE_SRC_NAMEVARA object used as the source in a ForEach  workflowName of a VARA object,
    maximum 200  characters

    GET_ATT,
    :PUT_ATT, Change Program,
    predefined variable

    However if I'm putting a VARA within the workflows script, it says
    30.04.2015 13:57:49 -  U0020343 Runtime error in object 'FOREACH', line '00001'. Cannot change attribute 'FE_SRC_NAME' for object type 'JOBP'.

    Is this a bug? Server is 10.0.4 build 521

    Regards
    Joel


  • 2.  Foreach workflow VARA not settable by script

    Posted Apr 30, 2015 01:46 PM

    This may be a feature to protect FOREACH workflows from infinite loops or otherwise being modified while in mid-flight in such a way that could cause workflow instability.  I suspect that as soon as the FOREACH reads the first row, it disallows further modification of this variable.  (I'm just guessing on this.)



  • 3.  Foreach workflow VARA not settable by script

    Posted May 01, 2015 04:02 AM
    That would be a reason, but I don't think that this was an intention - AFAIK the JOBP.FOREACH script is only processed once and not with each iteration, so changing the VARA would not be possible once the JOBP script was processed.

    Anyway, based on the documentation PUT_ATT should be possible, but isn't. So I personally think this is a bug?I would love to use this feature as we plan to have client-specific VARAs with names that differ from client to client.


  • 4.  Foreach workflow VARA not settable by script

    Posted May 13, 2015 02:17 AM
    I just tried With V10SP4 and it worked.

    Variable Object Definition in FE-JOBP properties:
     &VARA_SCHUBIDUBA#

    Process:
    :set &VARA_SCHUBIDUBA# = "VARA.FOREACH.BRW"



  • 5.  Foreach workflow VARA not settable by script

    Posted May 13, 2015 02:23 AM
    That will do the job.

    Anyway - IMHO the PUT_ATT with FE_SRC_NAME should either work or being removed from the documentation.


  • 6.  Foreach workflow VARA not settable by script

    Posted Sep 14, 2015 02:49 PM
    FYI joel_wiesmann_automic  It appears this has been fixed in the v11 documentation, but still occurring in the v10 docs. I checked with Dev and the docs for v10 will be fixed in 10.0.6.

    v11:
    hpb5o1erezmu.pnghttps://us.v-cdn.net/5019921/uploads/editor/jk/hpb5o1erezmu.png" width="500">


  • 7.  Foreach workflow VARA not settable by script

    Posted Sep 14, 2015 08:56 PM
    Hi Jennifer_Jinhong_34  

    Do you mean it's fixed in the documentation that only get_att is possible? I would prefer to have it fixed in the code ;)


  • 8.  Foreach workflow VARA not settable by script

    Posted Sep 15, 2015 06:03 PM
    Based on what is in the v11 docs, I think neither (get_att or put_att) would be a way to access the attribute.
    Since the functionality isn't available currently, I would create a post under the Product Ideas section explaining the business reason for the Product Managers to review.