cancel
Showing results for 
Search instead for 
Did you mean: 

Exception

noor_bpm
Champ in-the-making
Champ in-the-making
Hi
I have a very simple BPMN process it contain single service task and i am trying to get process instance i am getting the following error
i am using activiti 5.17 version , could you please help me to resolve this issue
org.activiti.engine.ActivitiIllegalArgumentException: unknown type 'user' approver


i am running the below code using main method

      private static String filename = "C:/activiti/Filewatcher.bpmn";
   private static String config_name = "activiti.cfg.xml";
   private static String process_bpmn_name = "Filewatcher.bpmn20.xml";
   private static String process_instance_key = "Filewatcher";

InputStream input = ClassLoader.getSystemResourceAsStream(config_name);
         processEngine = ProcessEngineConfiguration
               .createProcessEngineConfigurationFromInputStream(input)
               .buildProcessEngine();
         repositoryService = processEngine.getRepositoryService();
         repositoryService
               .createDeployment()
               .addInputStream(process_bpmn_name,
                     new FileInputStream(filename)).deploy();
               ProcessDefinition processDefinition = processEngine.getRepositoryService().createProcessDefinitionQuery().latestVersion().list().get(0);
         String processDefinitionId = processDefinition.getId();
         Map<String, String> variableMap = new HashMap<String, String>();
         variableMap.put("F_WorkFlowID", String.valueOf(workFlowID));
         variableMap.put("F_OrganisationPermID", OAPermID);
         variableMap.put("F_DocumentPermID", String.valueOf(documentID));
         variableMap.put("F_DCN", dcn);
         variableMap.put("F_contentType", contenType);
         variableMap.put("F_Document_Status", docStatus);
         ProcessInstance processInstance = processEngine.getFormService().submitStartFormData(processDefinitionId, variableMap);

activiti-cfg.xml
============

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://www.springframework.org/schema/beans
            http://www.springframework.org/schema/beans/spring-beans.xsd">
      <bean id="processEngineConfiguration" class="org.activiti.engine.impl.cfg.StandaloneInMemProcessEngineConfiguration">
         <property name="jdbcUrl" value="jdbc:sqlserver://U0093725-TPL-A:1433;DatabaseName=activiti" />
          <property name="jdbcDriver" value="com.microsoft.sqlserver.jdbc.SQLServerDriver" />
          <property name="jdbcUsername" value="sa" />
          <property name="jdbcPassword" value="P@ssword" />
         <property name="databaseSchemaUpdate" value="true"/>
         
      </bean>
      
      
</beans>


Thanks
Noor
1 REPLY 1

martin_grofcik
Confirmed Champ
Confirmed Champ
Could you create jUnit test please?
http://forums.activiti.org/content/sticky-how-write-unit-test

Regards,
Martin