Migrate from Activiti to Priostack
Last updated: 2026-04-06 · 10 min read
Concept Mapping
| Activiti | Priostack | Notes |
|---|---|---|
| ProcessEngine (Spring bean) | Hosted engine (no local install) | No Java/Spring required |
| JavaDelegate | Job Worker (any language) | Implement poll-activate-complete via REST |
| TaskListener / ExecutionListener | Not supported | Model as explicit sequence flow + Service Task instead |
| activiti:assignee / activiti:candidateGroups | User Task variables | Pass assignee as task variable; claim via API |
| ProcessDefinitionQuery | GET /api/v1/deployments | REST equivalent |
| RuntimeService.startProcessInstanceByKey | POST /api/v1/process-instances | Body: {"process_id":"key","variables":{}} |
| TaskService.complete() | POST /api/v1/tasks/{key}/complete | REST equivalent |
| HistoryService | Instance state endpoint | GET /api/v1/process-instances/{key} |
BPMN Namespace Changes
Activiti uses the activiti: namespace for extensions. Replace with zeebe::
Before (Activiti):
<serviceTask id="send-email" name="Send Email"
activiti:class="com.example.SendEmailDelegate">
<extensionElements>
<activiti:field name="to" expression="${order.email}" />
</extensionElements>
</serviceTask>
After (Priostack):
<serviceTask id="send-email" name="Send Email">
<extensionElements>
<zeebe:taskDefinition type="send-email" />
<zeebe:ioMapping>
<zeebe:input source="order.email" target="to" />
</zeebe:ioMapping>
</extensionElements>
</serviceTask>
activiti:class, activiti:expression, activiti:delegateExpression attributes. These will be ignored at best and cause parse failures at worst.
Migration Steps
Step 1 — Export all process and form definitions
Export .bpmn20.xml or .bpmn files from your Activiti workspace. If you use Activiti Designer (Eclipse plugin) or Activiti Modeler, export using "Save As BPMN 2.0 XML".
Step 2 — Strip Java delegate references
Use find-and-replace to remove Activiti-specific attributes. The key patterns to remove or replace:
# Patterns to remove / replace in your .bpmn files: activiti:class="..." → remove (replace task with zeebe:taskDefinition) activiti:expression="..." → remove activiti:formKey="..." → remove (use task variables instead) activiti:assignee="..." → remove (set via variable in worker output) activiti:candidateGroups="..." → remove
Step 3 — Deploy to Priostack
curl -X POST https://priostack.com/api/v1/deployments \ -H "X-API-Key: ps_your_key" \ -H "Content-Type: application/xml" \ --data-binary @order-process.bpmn
Step 4 — Implement REST workers (replaces JavaDelegate)
Each JavaDelegate class becomes a polling worker. Worker in Node.js example:
// poll for jobs of type "send-email"
const resp = await fetch('https://priostack.com/api/v1/jobs/activate', {
method: 'POST',
headers: { 'X-API-Key': 'ps_...', 'Content-Type': 'application/json' },
body: JSON.stringify({ type: 'send-email', worker: 'mailer-1', maxJobsToActivate: 5 })
});
const { jobs } = await resp.json();
for (const job of jobs) {
const { to } = job.variables;
await sendEmail(to); // your business logic
await fetch(`https://priostack.com/api/v1/jobs/${job.key}/complete`, {
method: 'POST',
headers: { 'X-API-Key': 'ps_...', 'Content-Type': 'application/json' },
body: JSON.stringify({ variables: { emailSent: true } })
});
}
Step 5 — Handle User Tasks
Activiti's Tasklist UI is replaced by Priostack's /tasklist or your own UI calling the tasks API:
# Get open tasks for a user
GET /api/v1/tasks
# Complete a task
POST /api/v1/tasks/{taskKey}/complete
Content-Type: application/json
{"variables":{"approved":true,"reviewNote":"Looks good"}}
Step 6 — Remove Spring ProcessEngine wiring
Remove camunda-bpm-spring-boot-starter or activiti-spring from your pom.xml/build.gradle. Your workers only need an HTTP client.
Timer / Boundary Events
Activiti timer events use ISO 8601 duration syntax — the same format Priostack expects:
<!-- 3-day SLA timer — same syntax in both engines -->
<boundaryEvent id="sla-timer" attachedToRef="review-task" cancelActivity="true">
<timerEventDefinition>
<timeDuration>PT72H</timeDuration>
</timerEventDefinition>
</boundaryEvent>
Unsupported Activiti Features
| Activiti feature | Status in Priostack |
|---|---|
| Embedded forms (activiti:formKey) | Not supported — pass variables directly |
| Event Subprocess | Not yet supported (roadmap) |
| TaskListener / ExecutionListener | Not supported — model as Service Tasks |
| Activiti Explorer UI | Use Priostack Dashboard + Tasklist instead |
| Database-backed history (ACT_HI_* tables) | In-memory instance state only |