cancel
Showing results for 
Search instead for 
Did you mean: 

Deploy Model via REST API

derlucky
Champ in-the-making
Champ in-the-making
Hi there,

I'm new to this and I will use Activiti in/for my bachelor thesis. So I started working with this. In the activiti-explorer is a built-in feature to deploy a already created model as a process definition. But I need this functionality in the REST API.

So here's my question: Is there any possible way to create a process definition remotely via the REST API, preferably by converting the model to a process definition?

Thanks in advance!

Lukas
4 REPLIES 4

derlucky
Champ in-the-making
Champ in-the-making
Anybody? 😕

vasile_dirla
Star Contributor
Star Contributor
Hi,
have a look into that class:

org.activiti.rest.service.api.repository.DeploymentCollectionResource

<code>
@RequestMapping(value="/repository/deployments", method = RequestMethod.POST, produces = "application/json")
  public DeploymentResponse uploadDeployment(@RequestParam(value="tenantId", required=false) String tenantId,
</code>

This method may be useful.

derlucky
Champ in-the-making
Champ in-the-making
Hi!
Thank you very much for your reply. This means, that a deployment is exactly the same as a process definition? But then I'm wondering, why in a process definition there is a deployment association or do I understand something wrong?

Thanks!

vasile_dirla
Star Contributor
Star Contributor
No, it's not the same.
have a look over the sources and you'll see what;s happening during deploy.
for example this class: org.activiti.engine.impl.bpmn.deployer.BpmnDeployer
this method:
public void deploy(DeploymentEntity deployment, Map<String, Object> deploymentSettings)