on 07-20-2015 10:45 AM
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?
Hello
Is this issue resolved?
Regards
Sandy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sandy,
Thank you for your response.
Here I am referrring to passing of the values from task container to rule container. Even though the task container shows the values populated in the workflow log, the same are not been passed to the rule container(which is maintained in 'Default Rules' tab in the task) because of which the the task does not have any agent assigned.
Thanks,
Chetan Taori
Hello Chetan
How are we so sure that the values are not passed to the rule? If you see the values in the Rule AND if you have done the BINDING between the Task And the RULE...then the values should be passed to the rule.
"No agents assigned" can be due to the reason that the task is not set to general.
Go to PFTC->Change the Task->menu Additional Data->maintain Agent Assignment ->Set the task 'Attributes' to General. If this is not the DEV system, transport them to Prod from Dev using:
So, check the Binding from the task to the rule and if it's there, check for Task Attribute (general task or not)
Regards,
Modak
Hello Modak,
We came to conclusion that the values are not been passed beacuse we got the desired result when we independently simulated the rule by giving the input value. Also the task is configured as general task and we are not getting the error as 'No agent assignment' but it follows the logic handled for blank input and accordingly fetches the default system user ID as the agent as per written in the rule logic.
Hello,
It is not possible to pass the container values from Rule to workflow container.
Regards
sandy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.