cancel
Showing results for 
Search instead for 
Did you mean: 

Create Substitutions for BPM Tasks

demetrius_pfoo
Explorer
0 Kudos

Hello,

is it possible to create Substitutions Rules for BPM-Tasks for other Users?

The BPM-Administrator should have the possibility to create a substitution for users, which aren't anymore in the company or be a long time unavailable (e.g. long disease).

Thank you for your help.

Greetings

Demetrius

Accepted Solutions (1)

Accepted Solutions (1)

former_member191044
Active Contributor
0 Kudos

Yes, build your own little application that uses the substitution API of BPM:

--> http://help.sap.com/saphelp_tm90/helpdata/de/b4/f63996e3854bcb87a11ee900219410/content.htm

hope this helps,

Regards,

Tobias

demetrius_pfoo
Explorer
0 Kudos

Hello Tobias,

thank you. I tried to use the API "TaskFacade" in the WS-Navigator. But actually i couldn't find a method, where I can fill both user, the substitiute and the substituted user. In the Method "CreateSubstitutionRule"  is only the possibility to enter the "". Therefore it is just possible to create a rule for the User who calls the Service.

What I'm doing wrong?

regards

Demetrius

former_member191044
Active Contributor
0 Kudos

As I mentioned. Create your own web dynpro java application and use the BPM API. Here you can create substitution rules just as you want. Take this snippet to play with:

IUserFactory userFactory = UMFactory.getUserFactory();

IUser substitutedUser = userFactory.getUserByUniqueName("uniqueName1");

IUser substitutingUser = userFactory.getUserByUniqueName("uniqueName");

Date startDate = new Date();

Date endDate = new Date(Long.valueOf("4102354800000"));

SubstitutionRuleManager rulesManager = BPMFactory.getSubstitutionRuleManager();

SubstitutionRule rule = rulesManager.createRule(substitutedUser, substitutingUser, SubstitutionMode.RECEIVE_TASKS, startDate, endDate, true);

rulesManager.storeRule(rule);

Hope this helps.

Regards,

Tobias

Answers (0)