0 Replies Latest reply on Feb 7, 2013 12:37 AM by Chetan Shinde

    Add multiple bpmn2/ftl assets to Guvnor

    Chetan Shinde Newbie



      I have a requirement where in I create a package into Guvnor and then I add multiple bpmn2 files to that package with corresponding ftl files to added to the Guvnor. my question is how can i do this programatically or using a batch process.


      One way that I have found out is using the REST API.


      This will create a package inside Guvnor.


      /packagesPOSTapplication/json and application/xmlapplication/json and application/xmlCreates a package from JSON or XML. Returns the newly created package in JSON or XML format.


      This will create an Asset inside the particular package named {packageName}. This takes the input as Atom Feed and the out is also an Atom Feed.


      /packages/{packageName}/assetsPOSTapplication/atom+xmlapplication/atom+xmlCreates an asset in package {packageName} from the Atom Entry provided. Following info are required from the input Atom Entry: asset name, asset description, asset initial category, asset format.



      I have experience of using the REST API to do the following using Java API - we used Apache Abdera API. (This API is used to return data as ATOM feeds).


      /packages/{packageName}/assetsGETapplication/atom+xmlnoneReturns the list of rule assets contained in package {packageName} as an Atom Feed.