cancel
Showing results for 
Search instead for 
Did you mean: 

current action title

Former Member
0 Kudos

Hi all,

how can I get the the title of the action which is processing at the moment.

In my solution I get an error message, maybe cause I mixed designtime-apis with runtime-apis.

String processID = executionContext.getProcessId();
String currentActionID = executionContext.getTaskId();
IWDClientUser wdUser = WDClientUser.getCurrentUser();
IGPUserContext userContext = GPContextFactory.getContextManager().createUserContext(wdUser.getSAPUser() ); 
IGPAction currentAction = GPProcessFactory.getDesigntimeManager().getCurrentActionTemplate(currentActionID, userContext); 
String actionTitle = currentAction.getTitle();

Bye Steve

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Steve,

Just use the following:


String processID = executionContext.getProcessId();
String currentActionID = executionContext.getTaskId();
IWDClientUser wdUser = WDClientUser.getCurrentUser();
IGPUserContext userContext = GPContextFactory.getContextManager().createUserContext(wdUser.getSAPUser() ); 
IGPActionInstance currentAction = GPProcessFactory.getRuntimeManager().getActionInstance(processID, currentActionID, userContext); 
String actionTitle = currentAction.getTemplate().getTitle();

Aliaksei

Former Member
0 Kudos

Hi Aliaksei,

there is only one way to go to rome, and I took the false.

Thanks you, works fine.

Thanks Steve

Former Member
0 Kudos

Hi

I have one similar problem. I want to change the description of next action depending upon the current action input.

Second, where do I write these line of code...In web dynpro project or CAF project.

I think i need to convert them to some callable object.

Please reply if anyone has any idea

Regards

Saurabh Garg

Answers (1)

Answers (1)

Former Member
0 Kudos

Can you please tell me where we have to write this code in Web dynpro component.

In which method??