Package org.camunda.bpm.engine

Examples of org.camunda.bpm.engine.ArtifactFactory


*/
public class DefaultArtifactFactoryTest {

  @Test
  public void testDefaultArtifactService() throws Exception {
    ArtifactFactory artifactFactory = new DefaultArtifactFactory();

    DummyArtifact artifact = artifactFactory.getArtifact(DummyArtifact.class);
    Assert.assertNotNull(artifact);
  }
View Full Code Here


  public static Object instantiateDelegate(Class<?> clazz, List<FieldDeclaration> fieldDeclarations) {
    return instantiateDelegate(clazz.getName(), fieldDeclarations);
  }

  public static Object instantiateDelegate(String className, List<FieldDeclaration> fieldDeclarations) {
    ArtifactFactory artifactFactory = Context.getProcessEngineConfiguration().getArtifactFactory();

    try {
      Class<?> clazz = ReflectUtil.loadClass(className);

      Object object = artifactFactory.getArtifact(clazz);

      applyFieldDeclaration(fieldDeclarations, object);
      return object;
    } catch (Exception e) {
      throw new ProcessEngineException("couldn't instantiate class " + className, e);
View Full Code Here

TOP

Related Classes of org.camunda.bpm.engine.ArtifactFactory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.