Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
3 replies
Subscribers
5 subscribers
Views
1098 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Plug-Ins
Not able to pull the deadline for a task or process below is the code used.
sarikab
over 10 years ago
Not able to pull the deadline for a task or process below is the code used.
ServiceContext serviceContext = ServiceLocator.getAdministratorServiceContext();
ProcessExecutionService pes = ServiceLocator.getProcessExecutionService(serviceContext);
LOG.debug(pes.getDeadlineForProcess(processId));
LOG.debug(pes.getDeadlineForTask(taskId));
Regards,
Sarika Bansal...
OriginalPostID-118695
OriginalPostID-118695
Discussion posts and replies are publicly visible
Parents
0
Eduardo Fuentes
Appian Employee
over 10 years ago
1. If you are executing this outside a smart service as a standalone Java snippet then you need this line at the beginning of your main method: ConfigurationLoader.initializeConfigurations();
Here is an example that worked for me. I am using two different approaches, the both print the same (getProcessDetails().getPriority() and getPriorityOfProcess() )
ConfigurationLoader.initializeConfigurations();
ServiceContext sc = ServiceContextFactory.getAdministratorServiceContext();
ProcessExecutionService pes = ServiceLocator.getProcessExecutionService(sc);
System.out.println(pes.getProcessDetails(processId).getPriority());
System.out.println(pes.getPriorityOfProcess(processId));
2.If you are using this within a plug-in then it should work but I suggest you use the ProcessExecutionService injected context
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
Eduardo Fuentes
Appian Employee
over 10 years ago
1. If you are executing this outside a smart service as a standalone Java snippet then you need this line at the beginning of your main method: ConfigurationLoader.initializeConfigurations();
Here is an example that worked for me. I am using two different approaches, the both print the same (getProcessDetails().getPriority() and getPriorityOfProcess() )
ConfigurationLoader.initializeConfigurations();
ServiceContext sc = ServiceContextFactory.getAdministratorServiceContext();
ProcessExecutionService pes = ServiceLocator.getProcessExecutionService(sc);
System.out.println(pes.getProcessDetails(processId).getPriority());
System.out.println(pes.getPriorityOfProcess(processId));
2.If you are using this within a plug-in then it should work but I suggest you use the ProcessExecutionService injected context
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data