How to get Details for Make task URL

1
0
-1

as per documentation how to get following details for store into saperate variable and use to make task url at runtime

1.current Host 2.current Port

3.Current Process Name 4. Current Procecss version 5.Activity Name (task name) 6.ActivityInstance ID

pl , pl provide me following data script to use for email task url

2 answers

1
+1
-1
This one is the BEST answer!

Hello,

you can check this script:

  1. import org.bonitasoft.engine.bpm.flownode.ActivityInstance;
  2. import org.bonitasoft.engine.bpm.process.ProcessDefinition;
  3.  
  4. ProcessDefinition processDefinition = apiAccessor.getProcessAPI().getProcessDefinition(processDefinitionId);
  5. ActivityInstance activityInstance = apiAccessor.getProcessAPI().getActivityInstance(activityInstanceId);
  6.  
  7. buffer.append("http://");
  8. buffer.append("localhost:8080");
  9. buffer.append("/bonita/portal/homepage?ui=form&locale=en&theme=");
  10. buffer.append(processDefinitionId);
  11. buffer.append("#form=");
  12. buffer.append(processDefinition.getName());
  13. buffer.append("--");
  14. buffer.append(processDefinition.getVersion());
  15. buffer.append("--");
  16. buffer.append(activityInstance.getName());
  17. buffer.append("\$entry&mode=app&task=");
  18. buffer.append(activityInstanceId);
  19. buffer.append("&assignTask=true");
  20. return buffer.toString();

Of course, you should replace localhost:8080 by the server address. You could use a parameter for that, if you are using Subscription edition.

Hope this helps, Haris

Comments

Submitted by kppatel on Thu, 05/15/2014 - 13:44

Thank you soooo mcuh Haris ,

1
0
-1

dont work form me show me other thinks

Notifications