1
0
-1

i have problem when run process manually using beanshell, this my bean shell script

WorkflowManager workflowManager = (WorkflowManager) AppUtil.getApplicationContext().getBean("workflowManager");
AppService appService = (AppService) AppUtil.getApplicationContext().getBean("appService");

AppDefinition appDefinition = new AppDefinition();
appDefinition = AppUtil.getCurrentAppDefinition();
WorkflowProcess processDef = appService.getWorkflowProcessForApp(appDefinition.getId(), appDefinition.getVersion().toString(), processDefKey);

WorkflowProcessResult processResult = workflowManager.processStart(processDefId, variableMap);

to fix the problem i get process id

String processId = processResult.getProcess().getInstanceId();

and then use the processId to store record

FormDataDao formDataDao = (FormDataDao) AppUtil.getApplicationContext().getBean("formDataDao");
FormRowSet rowsSubmitSetting = new FormRowSet();

rowSubmitSetting.setId(processId);
rowsSubmitSetting.add(rowSubmitSetting);
formDataDao.saveOrUpdate(formDefIdSetting, tableNameSetting, rowsSubmitSetting);

my problem is record with current process id not found when i get with jdbc or "formDataDao.find" (using bean shell again in other tool after running process).

any one to help me.

thanks in advance.

 

 

 

    CommentAdd your comment...

    1 answer

    1.  
      1
      0
      -1

      Hi, did you check to verify that the process ID is stored correctly as the ID in the form database table? Are there any error messages in the logs?

        CommentAdd your comment...