For a Granite Task, I can see setAction() and getAction() methods which sets and gets action-id. But I don't know how to tell what action is to be done for certain action-id.
How can we configure the action for an action-id?
Solved! Go to Solution.
Hi, Rahujai
You may do something like the example in the following
First get your task using task manager and then get the status of the task. There you can write your code according to your requirement if the task status is giving complete. Just go through property listener as well.
Thanks,
Vamsi
Views
Replies
Total Likes
Hi, Rahujai
Here is the API you need to use for achieving your requirements.
It has following methods you can use of....
void TaskManager.completeTask(String taskId, String actionId) Completes the task with the given id and action. Task TaskManager.createTask(String parentTaskId, Task task) Creates a subtask under the specified parentTaskid Task TaskManager.createTask(Task task) Creates a task. void TaskManager.deleteTask(String taskId) Deletes the task with the given task ID. Task TaskManager.getTask(String taskId) Retrieves a fully populated task instance for the given task id. Task TaskManager.getTask(String taskId, boolean retrieveSubTasks) Retrieves the task identified by taskId and opotionally retrieves the task's subtasks. Iterator<Task> TaskManager.getTasks(Filter filter) Same as calling TaskManager.getTasks(Filter, int, int) with startIndex of 0, and length of -1 Used as a convenience for calls that do not need to limit the number of tasks being returned Iterator<Task> TaskManager.getTasks(Filter filter, int startIndex, int length) returns all tasks for the specified task type, or all tasks if no tasktype specified. Task TaskManagerFactory.newTask(String taskTypeName) Creates a new task instance with the given task type name. Task TaskManager.saveTask(Task task) Saves the given task instance. void TaskManager.terminateTask(String taskId) Terminates the task
Thanks,
Vamsi
Hi rahujai,
Use the default action. I have not seen any example how to define custom action & also product source itself always using default action.
Thanks,
Views
Replies
Total Likes
Hi rahujai,
Use the default action. I have not seen any example how to define custom action & also product source itself always using default action.
Thanks,
Views
Replies
Total Likes
MC Stuff wrote...
Hi rahujai,
Use the default action. I have not seen any example how to define custom action & also product source itself always using default action.
Thanks,
Actually I want to trigger some code if someone completes the task. How can I achieve that?
Views
Replies
Total Likes
Hi, Rahujai
You may do something like the example in the following
First get your task using task manager and then get the status of the task. There you can write your code according to your requirement if the task status is giving complete. Just go through property listener as well.
Thanks,
Vamsi
Views
Replies
Total Likes
Views
Likes
Replies