JBoss Community

How to start a process with parameters when there is no associated form?

created by Shane Claggett in jBPM - View the full discussion

What is the proper way to programmatically start a jBPM process with parameters using the REST API when the workflow has no form associated with it? I've managed to get authentication working thanks to the this example, so I'm ready to kick off a workflow. Other posts on this forum point to two different methods to starting a process with parameters:

 

  1. For processes that have forms associated with them, the posts here and here describe a method to start the process using the REST API (the gist being to render the form first, then programmatically complete it to start the process).
  2. For processes that don't have forms associated with then, an older post here recommends modifying ProcessMgmtFacade.java to add a new REST endpoint that accepts process parameters.

 

Method #1 fails with the following exception if no form is associated with the process:

 

Servlet.service() for servlet Resteasy threw exception: org.jboss.resteasy.spi.UnhandledException: java.lang.RuntimeException: No UI associated with PROCESS defaultPackage.TestingTaskAssignment

 

Method #2 may work but modifying a third-party library seem like a hack and makes me wonder if I'm approaching the problem incorrectly. What would you recommend as a solution?

 

Thank you,

Shane

 

P.S. I'm currently running jBPM 5.4.0.Final in JBoss 7.

Reply to this message by going to Community

Start a new discussion in jBPM at Community