Skip to Content
avatar image
Former Member

Values not getting passed to the default rule from task container

We have a scenario where the binding is done from workflow to task but in the workflow log only the task container shows the values but the workflow container is empty. Since the task container is populated we have added the agent determination rule in the default rules tab of the task where binding is done from task container to rule container but still the values are not getting passed. We have done swu_obuf, also the import and export checks are applied correctly. Can somebody please help what can be the issue here?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • avatar image
    Former Member
    Jul 20, 2015 at 11:23 AM

    Hello,

    "We have a scenario where the binding is done from workflow to task but in the workflow log only the task container shows the values but the workflow container is empty."


    If you're doing workflow to task then you would expect the task to be empty too!


    I think we need to see some screenshots here, both of the bindings and the container contents.


    regards

    Rick

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 20, 2015 at 11:27 AM

    Hello,

    It is not possible to pass the container values from Rule to workflow container.

    POST data

    Regards

    sandy

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 20, 2015 at 11:30 AM

    Hello

    To pass data from the Rule binding to workflow container, you can use programming exit. Refer Code below

    You can use the Programming EXIT to set the workflow container element

    Create a custom class copying CL_SWF_TST_WAPI_EXIT and include it in the "Programming Exit" tab of the user decision step. In this exit for event SWRCO_EVENT_AFTER_RULE_EXEC , set the container element .


    CASE im_event_name.

           WHEN if_swf_ifs_workitem_exit~c_evttyp_after_rule_exec.

    * Get Rule Result

             CALL METHOD im_workitem_context->get_rule_result

               RECEIVING

                 re_agents = lt_rule_result.

    * Get Top Level Workitem Container

             CALL METHOD im_workitem_context->get_top_container

               RECEIVING

                 re_container = lo_top_container.

    * Set the Container Element for Agents

             TRY.

                 CALL METHOD lo_top_container->set

                   EXPORTING

                     name       = 'LAST_APPROVER'

                     value      = lt_rule_result

                   IMPORTING

                     returncode = lv_rc.

    http://scn.sap.com/thread/1440788

    http://wiki.scn.sap.com/wiki/display/ABAP/Program+Exits+In+Workflow

    Sample class CL_SWF_TST_WAPI_EXIT


    Regards

    Sandy

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Chetan

      if you see the values in Task Container and they are Not passed to the Rule Container; only thing left is to check the Binding between the rule and the Task. Did you check that?

      regards,

      Modak

  • avatar image
    Former Member
    Jul 21, 2015 at 12:11 AM

    Hello

    the same are not been passed to the rule container(which is maintained in 'Default Rules' tab in the task)

    You have mentioned that you are using the rule in the "Default Rules" tab of task PFTC. There is a binding icon right at top in PFTC-> Default Rules tab. Select the "Agent(Defualt Rule)" and maintain the bindings and check results.

    Also make sure that rule or agent determination defined outside the PFTC in the workflow definition activity step(Agents) is not overriding the default Rule agents.

    Regards

    Sandy

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 26, 2015 at 02:11 PM

    Hello

    Is this issue resolved?

    Regards

    Sandy

    Add comment
    10|10000 characters needed characters exceeded