Business workflow node configuration is owned by the real flow designer and persisted on BPMN nodes.
Task form resolution priority:
BPMN node formKey/formUrl/formJson/formFieldPermissions
> ai_business_binding.binding_config.nodeForms fallback
> process default form
Do not build a separate node configuration workbench in App Center.
A business user task should carry:
<bpmn:userTask
id="dept_leader_approve"
name="部门负责人审批"
flowable:assignee="${deptLeaderId}"
flowable:formKey="sample_purchase_order_approval_form"
flowable:formFieldPermissions='[
{"field":"arrivalListFileIds","label":"上传清单","readable":true,"writable":true,"required":false},
{"field":"deptLeaderRemark","label":"部门负责人意见","readable":true,"writable":true,"required":false}
]'
flowable:allowApprove="true"
flowable:allowReject="true"
flowable:allowDelegate="true"
flowable:allowReturn="false"
flowable:allowTerminate="false"
flowable:requireComment="true">
</bpmn:userTask>
Use formJson / formRef when the designer supports structured form references:
{
"type": "BUSINESS_CODE_FORM",
"formMode": "BUSINESS_CODE_FORM",
"objectCode": "sample_purchase_order",
"providerKey": "samplePurchaseOrder",
"formKey": "sample_purchase_order_approval_form",
"formUrl": "/business/purchase-order-test"
}
Assignee expressions:
flowable:assignee="${deptLeaderId}"
Multi-instance countersign:
<bpmn:multiInstanceLoopCharacteristics isSequential="false"
flowable:collection="${countersignUserList}"
flowable:elementVariable="assignee">
<bpmn:completionCondition xsi:type="bpmn:tFormalExpression"><![CDATA[${approved == false || nrOfCompletedInstances == nrOfInstances}]]></bpmn:completionCondition>
</bpmn:multiInstanceLoopCharacteristics>
Reject branch:
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[${approvalResult == 'reject'}]]></bpmn:conditionExpression>
Default branch:
default="Flow_approve".conditionExpression on the default sequence flow.For built-in samples, initialization may call FlowClient to create/deploy a model, but use this rule:
This preserves user-edited node field permissions and approval configuration.
BUSINESS_CODE_FORM and BusinessCodeFormProvider.BUSINESS_OBJECT_FORM and published runtime config.formUrl or formKey has leading/trailing spaces; trim before matching.nodeForms seed, but deployed BPMN has stale node attributes.