HomeDocs › Migration › Activiti

Migrate from Activiti to Priostack

Last updated: 2026-04-06 · 10 min read

Activiti uses BPMN 2.0 — the same standard as Priostack. Your process XML will load with minor attribute changes. The main migration effort is moving from Java Delegates to REST-based workers.

Concept Mapping

ActivitiPriostackNotes
ProcessEngine (Spring bean)Hosted engine (no local install)No Java/Spring required
JavaDelegateJob Worker (any language)Implement poll-activate-complete via REST
TaskListener / ExecutionListenerNot supportedModel as explicit sequence flow + Service Task instead
activiti:assignee / activiti:candidateGroupsUser Task variablesPass assignee as task variable; claim via API
ProcessDefinitionQueryGET /api/v1/deploymentsREST equivalent
RuntimeService.startProcessInstanceByKeyPOST /api/v1/process-instancesBody: {"process_id":"key","variables":{}}
TaskService.complete()POST /api/v1/tasks/{key}/completeREST equivalent
HistoryServiceInstance state endpointGET /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>
Remove all 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>
Timer events require the Priostack engine to be running continuously. If you're on the free tier, make sure your account is active. Timers are checked every 30 seconds.

Unsupported Activiti Features

Activiti featureStatus in Priostack
Embedded forms (activiti:formKey)Not supported — pass variables directly
Event SubprocessNot yet supported (roadmap)
TaskListener / ExecutionListenerNot supported — model as Service Tasks
Activiti Explorer UIUse Priostack Dashboard + Tasklist instead
Database-backed history (ACT_HI_* tables)In-memory instance state only
Questions about a specific Activiti flow? Email support@priostack.com with your BPMN and the Activiti behavior you need.

← Camunda 7 Migration · Flowable Migration Guide →