Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

How to Update Workflow Priority

muthuprasanthm4
Level 2
Level 2

Hi All,

 

I want to update the workflow priority such that all the steps should be in the updated priority. By default, it is getting medium priority.

I tried to create a new custom process step to update the priority, however, it is not working properly.

PFB the code to I currently have in the custom process step

import com.adobe.granite.workflow.exec.InboxItem.Priority;

@component(service=WorkflowProcess.class, property = {"process.label=Assign Priority"})
public class AssignPriority implements WorkflowProcess {
    public void execute(WorkItem item, WorkflowSession wfSession, MetaDataMap args) throws WorkflowException {
        item.setPriority(Priority.HIGH);
    }
}

 

Any help would be appreciated.

 

Update Priority workflow
1 Accepted Solution
vanegi
Correct answer by
Employee
Employee

Priority: The available options are High, Medium, and Low. The default value is Medium. 

You can change it though in process step using WorkItem API. https://helpx.adobe.com/experience-manager/6-3/sites/developing/using/reference-materials/javadoc/co...

 

OR

While creating new task, you can set the priority.

Capture.JPG

 

The logic to fetch or create data for TouchUI inbox is at the Java side, below is the basic flow:

~ A request to '/aem/inbox' resolves to path '/libs/cq/inbox/content/inbox'.

~ This renders data per [1] which creates the html page per [2].

~ At the same time [1] triggers a get request to fetch the data for the inbox page [3] which is handled by a servlet [4] and used by [2] to create the complete inbox page.

~ Further on logic goes to [5] and [6] to fetch the data per the logic.

[0]: /libs/cq/inbox/content/inbox

[1]: /libs/cq/inbox/content/inbox/jcr:content/views/list/datasource

[2]: /libs/cq/inbox/gui/components/inbox/inboxitem/list/list.html

[3]: cq/inbox/gui/components/inbox/datasource/itemsdatasource

[4]: com.adobe.cq.inbox.impl.servlet.ItemsDataSourceServlet.java

[5]: com.adobe.granite.workflow.core.WorkflowSessionImpl.java

[6]: com.adobe.granite.workflow.core.jcr.WorkItemManager.java

View solution in original post

3 Replies
Arun_Patidar
Community Advisor
Community Advisor

Hi, 

You can set the priority for the workflowItem. I am not sure if you need to call wfsession save at the end.  If workflow API does not work then you can use JCR/Node API. 

Arun_Patidar_0-1594829779113.png

 

 

 

vanegi
Correct answer by
Employee
Employee

Priority: The available options are High, Medium, and Low. The default value is Medium. 

You can change it though in process step using WorkItem API. https://helpx.adobe.com/experience-manager/6-3/sites/developing/using/reference-materials/javadoc/co...

 

OR

While creating new task, you can set the priority.

Capture.JPG

 

The logic to fetch or create data for TouchUI inbox is at the Java side, below is the basic flow:

~ A request to '/aem/inbox' resolves to path '/libs/cq/inbox/content/inbox'.

~ This renders data per [1] which creates the html page per [2].

~ At the same time [1] triggers a get request to fetch the data for the inbox page [3] which is handled by a servlet [4] and used by [2] to create the complete inbox page.

~ Further on logic goes to [5] and [6] to fetch the data per the logic.

[0]: /libs/cq/inbox/content/inbox

[1]: /libs/cq/inbox/content/inbox/jcr:content/views/list/datasource

[2]: /libs/cq/inbox/gui/components/inbox/inboxitem/list/list.html

[3]: cq/inbox/gui/components/inbox/datasource/itemsdatasource

[4]: com.adobe.cq.inbox.impl.servlet.ItemsDataSourceServlet.java

[5]: com.adobe.granite.workflow.core.WorkflowSessionImpl.java

[6]: com.adobe.granite.workflow.core.jcr.WorkItemManager.java

View solution in original post

muthuprasanthm4
Level 2
Level 2

@vanegi I am currently using WorkItem as you mentioned to update the priority. However it's not working properly