public class Maclasse extends JBPMSpringActionHandler {
private static final long serialVersionUID = 5L;
private static final Logger logger = Logger.getLogger(Maclasse.class);
private BeanFactory factory;
private ServiceRegistry services;
private NodeService nodeService;
private AuthorityDAO authorityDAO;
private PermissionService permissionService;
private OwnableService ownableService;
@Override
protected void initialiseHandler(BeanFactory factory) {
this.factory = factory;
services = (ServiceRegistry)this.factory.getBean(ServiceRegistry.SERVICE_REGISTRY);
authorityDAO = (AuthorityDAO)this.factory.getBean("authorityDAO");
nodeService = (NodeService)this.factory.getBean("nodeService");
permissionService = (PermissionService)this.factory.getBean("permissionService");
ownableService = (OwnableService)this.factory.getBean("ownableService");
}
public void execute(ExecutionContext executionContext) throws Exception {
try {
Object res = executionContext.getContextInstance().getVariable("bpm_package");
if(res == null) {
//never enters here
logger.fatal("bpm_package is null");
return;
}
final NodeRef nodeRef = ((JBPMNode) res).getNodeRef();
if(nodeRef == null) {
//never enters here
logger.fatal("NodeRef is null");
return;
}
….
Object res = executionContext.getContextInstance().getVariable("bpm_package");
Node Type: {http://www.alfresco.org/model/content/1.0}systemfolder, Node Aspects: [{http://www.alfresco.org/model/content/1.0}auditable, {http://www.alfresco.org/model/system/1.0}referenceable, {http://www.alfresco.org/model/bpm/1.0}workflowPackage]
final NodeRef nodeRef = ((JBPMNode) res).getNodeRef();
Content from pre 2016 and from language groups that have been closed.
Content is read-only.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.