Java Code Examples for org.activiti.engine.impl.bpmn.helper.ClassDelegate#defaultInstantiateDelegate()
The following examples show how to use
org.activiti.engine.impl.bpmn.helper.ClassDelegate#defaultInstantiateDelegate() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DefaultActivityBehaviorFactory.java From activiti6-boot2 with Apache License 2.0 | 5 votes |
protected ActivityBehavior createMuleActivityBehavior(TaskWithFieldExtensions task, List<FieldExtension> fieldExtensions) { try { Class<?> theClass = Class.forName("org.activiti.mule.MuleSendActivitiBehavior"); List<FieldDeclaration> fieldDeclarations = createFieldDeclarations(fieldExtensions); return (ActivityBehavior) ClassDelegate.defaultInstantiateDelegate( theClass, fieldDeclarations); } catch (ClassNotFoundException e) { throw new ActivitiException("Could not find org.activiti.mule.MuleSendActivitiBehavior: ", e); } }
Example 2
Source File: DefaultActivityBehaviorFactory.java From activiti6-boot2 with Apache License 2.0 | 5 votes |
protected ActivityBehavior createCamelActivityBehavior(TaskWithFieldExtensions task, List<FieldExtension> fieldExtensions) { try { Class<?> theClass = null; FieldExtension behaviorExtension = null; for (FieldExtension fieldExtension : fieldExtensions) { if ("camelBehaviorClass".equals(fieldExtension.getFieldName()) && StringUtils.isNotEmpty(fieldExtension.getStringValue())) { theClass = Class.forName(fieldExtension.getStringValue()); behaviorExtension = fieldExtension; break; } } if (behaviorExtension != null) { fieldExtensions.remove(behaviorExtension); } if (theClass == null) { // Default Camel behavior class theClass = Class.forName("org.activiti.camel.impl.CamelBehaviorDefaultImpl"); } List<FieldDeclaration> fieldDeclarations = createFieldDeclarations(fieldExtensions); addExceptionMapAsFieldDeclaration(fieldDeclarations, task.getMapExceptions()); return (ActivityBehavior) ClassDelegate.defaultInstantiateDelegate( theClass, fieldDeclarations); } catch (ClassNotFoundException e) { throw new ActivitiException("Could not find org.activiti.camel.CamelBehavior: ", e); } }
Example 3
Source File: DefaultActivityBehaviorFactory.java From flowable-engine with Apache License 2.0 | 5 votes |
protected ActivityBehavior createMuleActivityBehavior(TaskWithFieldExtensions task, List<FieldExtension> fieldExtensions, BpmnModel bpmnModel) { try { Class<?> theClass = Class.forName("org.flowable.mule.MuleSendActivityBehavior"); List<FieldDeclaration> fieldDeclarations = createFieldDeclarations(fieldExtensions); return (ActivityBehavior) ClassDelegate.defaultInstantiateDelegate(theClass, fieldDeclarations); } catch (ClassNotFoundException e) { throw new ActivitiException("Could not find org.flowable.mule.MuleSendActivityBehavior: ", e); } }
Example 4
Source File: DefaultActivityBehaviorFactory.java From flowable-engine with Apache License 2.0 | 5 votes |
protected ActivityBehavior createCamelActivityBehavior(TaskWithFieldExtensions task, List<FieldExtension> fieldExtensions, BpmnModel bpmnModel) { try { Class<?> theClass = null; FieldExtension behaviorExtension = null; for (FieldExtension fieldExtension : fieldExtensions) { if ("camelBehaviorClass".equals(fieldExtension.getFieldName()) && StringUtils.isNotEmpty(fieldExtension.getStringValue())) { theClass = Class.forName(fieldExtension.getStringValue()); behaviorExtension = fieldExtension; break; } } if (behaviorExtension != null) { fieldExtensions.remove(behaviorExtension); } if (theClass == null) { // Default Camel behavior class theClass = Class.forName("org.flowable.camel.impl.CamelBehaviorDefaultImpl"); } List<FieldDeclaration> fieldDeclarations = createFieldDeclarations(fieldExtensions); addExceptionMapAsFieldDeclaration(fieldDeclarations, task.getMapExceptions()); return (ActivityBehavior) ClassDelegate.defaultInstantiateDelegate(theClass, fieldDeclarations); } catch (ClassNotFoundException e) { throw new ActivitiException("Could not find org.flowable.camel.impl.CamelBehaviorDefaultImpl: ", e); } }
Example 5
Source File: DefaultActivityBehaviorFactory.java From activiti6-boot2 with Apache License 2.0 | 4 votes |
protected MailActivityBehavior createMailActivityBehavior(String taskId, List<FieldExtension> fields) { List<FieldDeclaration> fieldDeclarations = createFieldDeclarations(fields); return (MailActivityBehavior) ClassDelegate.defaultInstantiateDelegate( MailActivityBehavior.class, fieldDeclarations); }
Example 6
Source File: DefaultActivityBehaviorFactory.java From activiti6-boot2 with Apache License 2.0 | 4 votes |
public ShellActivityBehavior createShellActivityBehavior(ServiceTask serviceTask) { List<FieldDeclaration> fieldDeclarations = createFieldDeclarations(serviceTask.getFieldExtensions()); return (ShellActivityBehavior) ClassDelegate.defaultInstantiateDelegate( ShellActivityBehavior.class, fieldDeclarations); }
Example 7
Source File: DefaultActivityBehaviorFactory.java From flowable-engine with Apache License 2.0 | 4 votes |
protected MailActivityBehavior createMailActivityBehavior(String taskId, List<FieldExtension> fields) { List<FieldDeclaration> fieldDeclarations = createFieldDeclarations(fields); return (MailActivityBehavior) ClassDelegate.defaultInstantiateDelegate(MailActivityBehavior.class, fieldDeclarations); }
Example 8
Source File: DefaultActivityBehaviorFactory.java From flowable-engine with Apache License 2.0 | 4 votes |
@Override public ShellActivityBehavior createShellActivityBehavior(ServiceTask serviceTask) { List<FieldDeclaration> fieldDeclarations = createFieldDeclarations(serviceTask.getFieldExtensions()); return (ShellActivityBehavior) ClassDelegate.defaultInstantiateDelegate(ShellActivityBehavior.class, fieldDeclarations); }