Expand my Community achievements bar.

SOLVED

Programmatically go to next step from participant step

Avatar

Level 4

Can we programmatically go to next step from participant step. I have requirement where the inbox notification is sent programmatically. There when the user selects the complete step then would like the workflow step to invoke next step. The below is the code for sending inbox notification.

InboxNotification inboxNotification = inboxNotificationSender.buildInboxNotification();

inboxNotification.setAssignee(userId);

inboxNotification.setTitle("Approve the content/Asset ");

inboxNotification.setMessage("Approve the content/Asset ");

inboxNotification.setInstructions("testinstruction");

String[] routes = new String[nextSteps.size()];

for(int i = 0; i < nextSteps.size(); i++) {

routes[i] = nextSteps.get(i).getName();

}

inboxNotification.setNotificationActions(routes);

1526565_pastedImage_3.png

But when i select the action it is not going to the respective workflow step.

So how to navigate to that step when user selects the action.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi,

Not sure if you can link inbox task to workflow instance.

When you are sending notification to act? As a part of workflow step or you have other utility which sends notification?

Anyways you can create custom action to achieve this. Customize http://localhost:4502/aem/inbox in vanilla AEM 6.4instance

Thaks

Arun



Arun Patidar

View solution in original post

4 Replies

Avatar

Community Advisor

Hi,

As I understand, you want to go to next step based on what user select from inbox workflow notification item(workitem).

Why don't you use OR Step, which allows user to choose next step.

Or you can design your workflow using Go To and Branch Steps.

Because I believe you are creating notification task, that just act as a notification and complete the task but workitem are different than notification Task.

Thanks

Arun



Arun Patidar

Avatar

Level 4

Hi Arun,

My requirement is to have a custom message in the inbox of the user. So i have programmatically created the inbox notification. But I also want to go to next step when user selects the task. else is there any way to have custom participant step.

Avatar

Correct answer by
Community Advisor

Hi,

Not sure if you can link inbox task to workflow instance.

When you are sending notification to act? As a part of workflow step or you have other utility which sends notification?

Anyways you can create custom action to achieve this. Customize http://localhost:4502/aem/inbox in vanilla AEM 6.4instance

Thaks

Arun



Arun Patidar