cancel
Showing results for 
Search instead for 
Did you mean: 

Assigning the processor role dynamically

Former Member
0 Kudos

Hello,

I am creating a GP using Webdynpro for GP Interface Callable Object in which the initiator fills out certain details like issue ,ticket no...using the webdynpro view...which has a dropdown also for module ...based on the module selected in the dropdown the workitem should go for approval in the UWL for the corresponding lead of the module....and not to all the processors of the action....how can I achieve this dynamically....?

Any help would be highly appreciated.

Regards,

Anil

Accepted Solutions (1)

Accepted Solutions (1)

former_member201361
Active Contributor
0 Kudos

Hi Anil,

Add a node attribute say "Userid " of type "String" .

in the web dynpro callable object, based on the module selected get the user using user API (as shown below) and set it ot the Userid attribute in the complete method.

IUserFactory userFactory = UMFactory.getUserFactory();

user = userFactory.getUserByLogonID("*** user login id to whom the next action has to be assigned **" );

wdContext.currentContextElement.setUserId(user.getUniqueID());

for accessing the IUSER API , u need to add tc/je/usernanagement/api from ENGFACADE.

(open the component properties of ur component and click dependencies --> click add button --> select tc/je/usernanagement/api from ENGFACADE).

create a callable object say -->Assign Users to process Role .

(in the design time select create callable object and select User management--> Assign User to process Role which has Structure User Item as input ).

After the web dynpro callable object , insert this callable object and do the mapping between the Userid and uniqueId of Structure.

Thanks and regards

Former Member
0 Kudos

Hello Fazal,

Thanks for the reply again...I added the user api.....and the code to set the user id context variable in the view based on the module selected by the user....and mapped the userid to the userid in the component controller and set the output variable in the Complete() method.....then i created an action next to this with CO 'Assign User to role' and mapped the output userid to the user identifier of the CO.....then is the 3rd action of type Visual Approval to send the request as a workitem to the userid set earlier....so there are 3 actions in one block....

but finally the workitem does not appear in the worklist of the userid set...

Please help.

Anil

Edited by: Anil Kumar on Jan 30, 2009 8:40 PM

Former Member
0 Kudos

Finally set the 'filled from context parameter' value and it worked....Thanks for all your help.

DeeptiChavare
Active Participant
0 Kudos

Hi Anil,

I am also assigning roles to activity using "Filled from context parameter".

But in my case, this activity should be assigned to multiple users. Hence I am using a node with cardinality 0..n.

The problem is, though I fill multiple user ids, task goes to single (always first) user id only.

Can you help me solve this problem?

Regards,

Deepti

Answers (1)

Answers (1)

guillaume-hrc
Active Contributor
0 Kudos

Hi,

Did you try the dynamic assignment as context parameter on the next block ?

/people/dipankar.saha3/blog/2007/05/31/how-to-create-dynamic-approval-process-using-conditional-loop-block-in-guided-procedure (including the comments on this blog)

Best regards,

Guillaume

Former Member