cancel
Showing results for 
Search instead for 
Did you mean: 

Problem while starting GP work flow from Wedynpro application

Former Member
0 Kudos

Hi Experts,

I have one more problem in my workflow.

1. Data entry from - User1

2. Verification. - User2 - Multiple Users.

3. Post - User3

Requirement: I need to start GP workflow from webdynpro application, i am able start a GP from webdynpro static users.

Problem: I am not able assign dynamically users( Context parameter mapping to role).

If i assign(User) role at before starting process from coding i am able to start a process, if i select context parameter and without assign user it is giving exception like:

com.sap.caf.eu.gp.exception.api.GPEngineException: Enter a role Action_2 of role type 2

Selected context parameter and i assign user from coding :

com.sap.caf.eu.gp.exception.api.GPEngineException: Enter a role Action_2 of role type 2

Action_2 is second level in my workflow.

If i select context parameter it is not starting process, i won't select context parameter process it starting..

I need get the user from backbend and assign to second level in my workflow.

Please give any solution to this problem..........

Regards,

Satya.

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member4529
Active Contributor
0 Kudos

Hi,

Though the issue is not very clear to me what I can guess is you are having a problem in assigning the processor of actions in your GP process which you want to do dynamically at runtime. If this is the issue then I can suggest a simple solution :

Add an input parameter of type string in the callable object for which you want to assign the processor dynamically. Also add the same parameter as an output in the CO before that where you find out the actual user name from backend. Now group these two parameters in the Parameters tab in the GP design time. Also at the Roles tab set the processor of the Action 2 as "Filled from Context Parameter" and select the input parameter which you have defined for its CO. Save and activate the process. Find out the actual username/role in the first CO assign it to the output parameter you have defined. Now if you run your process it should work fine.

Also you can refer the following documents for more information on dynamic user assignment in GP process:

[Using Parallel Dynamic Block and Dynamic User Assignment|

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/fe43ced1-0c01-0010-10ae-bc49598b...;

[SAP Network Blog: How To Create Dynamic Approval Process Using Conditional Loop Block in Guided Procedure|/people/dipankar.saha3/blog/2007/05/31/how-to-create-dynamic-approval-process-using-conditional-loop-block-in-guided-procedure]

Also you can refer the following document as a general purpose guidelines and best practices document for developing composite application :

[Composite Application Development Cookbook|https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/8253] [original link is broken] [original link is broken] [original link is broken];

Thanks,

Dipankar