5 Replies Latest reply on Nov 4, 2011 7:31 AM by d.y.

    Accessing Guvnor using the REST API

    d.y.

      Hey there,

       

      I'm new to REST and i wonder how i can add a process from the guvnor repository to my knowledgeBase. When I add processDefinitions from my pc to my KnowledgeBase i would do like this:

       

      KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();

      kbuilder.add(new ClassPathResource("fileName.BPMN"), ResourceType.BPMN2);

       

      Using the REST API I can either

       

      get the xml:

      http://localhost:8080/guvnorJB7/rest/packages/firstPackage/assets/process/source

       

      or the bpmn file:

      localhost:8080/guvnorJB7/rest/packages/firstPackage/assets/process/binary

       

      but I don't know how i would add the processDefinition to the KnowledgeBase.

       

      Anyone of you may help me with this issue?

       

      Thank you in advance.