[entpack] I Need help to create/insert NetBeans BPEL activities

  • From: "ztarek77" < >
  • To:
  • Subject: [entpack] I Need help to create/insert NetBeans BPEL activities
  • Date: Wed, 06 Nov 2013 04:41:55 -0500

Hi,
I'm glad to enjoy the Netbeans SOA Forum and hope finding solution to my 
questions.
I want to create/insert BPEL activities in a BPEL process. I can read a bpel 
file and get the process activities till now.

Hereafter is my main :

    public static void main(String[] args) throws IOException, 
BadLocationException, Exception {
        // TODO Auto-generated method stub      
        File bpelFile = new File("models/ProcessTest.bpel");          
        FileInputStream fis = new FileInputStream(bpelFile);
        myCatalogModel calg= new myCatalogModel();
        Lookup lookup = Lookups.fixed(new Object[]{bpelFile, 
calg.loadPlainDocument(fis),
                   calg});
        ModelSource source = new ModelSource(lookup,true);
        //BpelModelFactoryImpl factory = new BpelModelFactoryImpl();
        BpelModelFactory factory = 
Lookup.getDefault().lookup(BpelModelFactory.class);
        BpelModel model = factory.getModel(source);      
        BpelBuilderImpl bpelBuilder = new BpelBuilderImpl((BpelModelImpl) 
model);        
        Assign asg=  bpelBuilder.createAssign();
        asg.setName("Assign1");
        Sequence seq= (Sequence) 
bpelBuilder.getModel().getProcess().getActivity().getChildren().get(0);
        seq.setActivity(asg, 0);
}

But when i try to create a new bpel activity like for example an "Assign" 
activity in the above code, the compiler throws an exception caused by the 
line 
Assign asg=  bpelBuilder.createAssign(); 

Exception in thread "main" java.lang.UnsupportedOperationException: 
setAttribute access not supported.
    at 
org.netbeans.modules.xml.xam.dom.ReadOnlyAccess.setAttribute(ReadOnlyAccess.java:159)
    at 
org.netbeans.modules.xml.xam.dom.AbstractDocumentComponent.setAttribute(AbstractDocumentComponent.java:483)
    at 
org.netbeans.modules.xml.xam.dom.AbstractDocumentComponent.setAttributeQuietly(AbstractDocumentComponent.java:277)
    at 
org.netbeans.modules.xml.xam.dom.AbstractDocumentComponent.setAttribute(AbstractDocumentComponent.java:124)
    at 
org.netbeans.modules.bpel.model.impl.BpelEntityImpl.setAttribute(BpelEntityImpl.java:340)
    at 
org.netbeans.modules.bpel.model.impl.AttributeAccess.setAttribute(AttributeAccess.java:1048)
    at 
org.netbeans.modules.bpel.model.impl.AttributeAccess.setBpelAttribute(AttributeAccess.java:232)
    at 
org.netbeans.modules.bpel.model.impl.BpelEntityImpl.setBpelAttribute(BpelEntityImpl.java:405)
    at 
org.netbeans.modules.bpel.model.impl.NamedElementImpl.setName(NamedElementImpl.java:61)
    at 
org.netbeans.modules.bpel.model.impl.services.DefaultNameService.postDispatch(DefaultNameService.java:74)
    at 
org.netbeans.modules.bpel.model.impl.BpelModelImpl.postInnerEventNotify(BpelModelImpl.java:647)
    at 
org.netbeans.modules.bpel.model.impl.BpelEntityImpl.postEvent(BpelEntityImpl.java:858)
    at 
org.netbeans.modules.bpel.model.impl.BpelEntityImpl.<init>(BpelEntityImpl.java:92)
    at 
org.netbeans.modules.bpel.model.impl.BpelContainerImpl.<init>(BpelContainerImpl.java:51)
    at 
org.netbeans.modules.bpel.model.impl.ExtensibleElementsImpl.<init>(ExtensibleElementsImpl.java:44)
    at 
org.netbeans.modules.bpel.model.impl.NamedElementImpl.<init>(NamedElementImpl.java:42)
    at 
org.netbeans.modules.bpel.model.impl.ActivityImpl.<init>(ActivityImpl.java:49)
    at 
org.netbeans.modules.bpel.model.impl.AssignImpl.<init>(AssignImpl.java:56)
    at 
org.netbeans.modules.bpel.model.impl.BpelBuilderImpl.createAssign(BpelBuilderImpl.java:189)
    at Mytestpackage.MainTestClass.main(MainTestClass.java:59)


Could you please give me some hint about this problem, or a sample of code so 
i can create/insert BPEL activities.


Thank you very much in advance.






[entpack] I Need help to create/insert NetBeans BPEL activities

ztarek77 11/06/2013

Project Features

About this Project

www was started in November 2009, is owned by jpirek, and has 21 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20140418.2d69abc). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close