String processDefId = assignment.getProcessDefId();
WorkflowProcess process = workflowManager.getProcess(processDefId);
if (process != null) {
String packageId = process.getPackageId();
Long packageVersion = Long.parseLong(process.getVersion());
PackageDefinition packageDef = packageDefinitionDao.loadPackageDefinition(packageId, packageVersion);
if (packageDef != null) {
appDef = packageDef.getAppDefinition();
}
}
}
if (appDef != null && appDef.getPackageDefinition() != null) {
PackageDefinition packageDef = appDef.getPackageDefinition();
String processDefId = WorkflowUtil.getProcessDefIdWithoutVersion(assignment.getProcessDefId());
PackageActivityPlugin activityPluginMeta = packageDef.getPackageActivityPlugin(processDefId, assignment.getActivityDefId());
Plugin plugin = null;
if (activityPluginMeta != null) {
plugin = pluginManager.getPlugin(activityPluginMeta.getPluginName());