public static WorkflowContext buildContext(ObjectMapper objectMapper, WorkflowProcess process,
            WorkflowProcessEntity processEntity) {
        try {
            ProcessForm form = WorkflowUtils.parseProcessForm(objectMapper, processEntity.getFormData(), process);
            return new WorkflowContext().setProcess(process)
                    .setOperator(processEntity.getApplicant())
                    .setProcessForm(form)
                    .setProcessEntity(processEntity);
        } catch (Exception e) {
            LOGGER.error("build context from process form failed with id=" + processEntity.getId(), e);
            return null;
        }
    }
Build workflow context from WorkflowProcess and WorkflowProcessEntity
inlong-manager/manager-workflow/src/main/java/org/apache/inlong/manager/workflow/util/WorkflowUtils.java