AnsweredAssumed Answered

access WCM Package

Question asked by preetigupta on Sep 18, 2009
Hi,

I have to access the content file in workflow at java side. I deployed the following code and this worked in DM

   public void execute(ExecutionContext executionContext) throws Exception {

      ContextInstance contextInstance = executionContext.getContextInstance();
      JBPMNode jbpmNode = (JBPMNode) contextInstance.getVariable("bpm_package");
      NodeRef packageNodeRef = jbpmNode.getNodeRef();
      List<ChildAssociationRef> childRefList = nodeService.getChildAssocs(packageNodeRef);
      for (ChildAssociationRef childAssocRef : childRefList) {
         NodeRef nodeRef = childAssocRef.getChildRef();
         Node nd=new Node(nodeRef);
         System.out.println("*****Node name is"+nd.getName());

      }
   }


But, I have to do this in WCM. I tried to do through AVM service but all I could not get the package file name in workflow running in WCM.

Could you please direct me how to achieve this.

Thanks and Regards
Preeti Gupta

Outcomes