Get package content

Certified Lead Developer

Hi,

A situation that arise frequently is that there are several issues open, and two or more of them include same interface, rule or any other kind of appian object. Deveoppers assigned to each issue made necessary changes and usually they coordinate themselves without problem, but in ocassions we deploy untested or unwanted changes to upper environments by mistake.

So, I am thinking on a application that help us on get a better control on deployments. This application act as a ongoing package inventory, and should be able to compare contents of each packages in order to warn about objects that were part of mor than one package.

To do so, I need a way to programmatically get the content of a package.

Does anybody know a way to achieve this?

Regards

  Discussion posts and replies are publicly visible

  • Hi Luis,

    • two or more of them include same interface, rule or any other kind of appian object. -> In this case you can use version history to avoid this type of issues.
    • This application act as a ongoing package inventory and should be able to compare contents of each packages in order to warn about objects that were part of more than one package. -> In this case you can use Inspect button at the time of package deployment before using of Import button directly.

    Thanks and Regards,

    Vigneshkumar Radhakrishnan

  • 0
    Certified Senior Developer

    AFAIK, there is no way to keep track of unnecessary deployed items in the upper environment. And if you are looking to create another application to keep track of ongoing packages, then this will be more complex to keep both applications synced as there is no way to easily reflect changes from one application to another. 
    If in case of unwanted deployed packages, just deploy the package with the right objects and the changes will be reflected on the higher environment. 

  • Hi ,

    Assuming that your idea it is possible (which unfortunately is not at this moment, there's not native way to retrieve package contents programmatically) probably you will encounter problems comparing packages, mainly because you could have the same object in different package throughout the history (if you dont delete them). A date filter it helps likely; however, could be not accurate enough. I propose you consider these options:

    Option 1 - App Read File Fuctions
    Detail: Create an application that allows upload the packages exported files (patches, or content / processModel folder) and can read it using fuctions like xpathdocument()readtextfromfile(). Then, you can compare it and decide about it.
    Pros: You can compare between several packages + Easy to build + You can leverage design-guidance.json file to expand the recommendations/info that you show to the developers.
    Cons: Manually upload the package.

    Option 2 - Design and Integrate a Jenkins pipeline
    DetailDesign a DevOps model (using Jenkins for example) where you can use the steps to evalute conditions. In your case, evaluate if the objetcs you are upgrading are already deployed.
    Pros: More flexible and strong DevOps pipeline.
    Cons: External technology + no basic implementation

    Option 3 - Enable Government DepOps
    DetailGo to Admin Console / DevOps / Infrastructure and enable requiere review (create a group DevOps first).
    Pros: Easiest implementation + User Notification
    Cons: You have to compare manually the packages. 

    Hope it helps,

    Rómulo

  • 0
    Certified Lead Developer

    This would be a way to obtain that:

    1- Obtain the zip document using a!deployment(<UUID>,"objectsPackageId")

    2- Go to content folder

    3- Every xml file is an object contained in the package, so you can iterate using getcontentdetailsbyuuid(<NAME_DOC>)

    Best

  • Hi Jesus,

    This is a post deployment operation. It looks like the use case Luis is looking for is before that (avoid summit unnecessary objects).

    However, could be interesting for Luis using the function a!toDeployment() after reviewing them.

    Cheers,

    Rómulo

  • Thank you all. 

    Once I've realized that, at this moment, ther is no way to retrieve packages content programmatically, I've done something on MS Excel based upon Export log file you can get manually when you are exporting a package. These export log files includes package content and they can be easily imported to an Excel sheet.

    So, I import on the same excel sheet every package I have on going, and can compare the contents before deployment.

    That wasn't my first idea, but it meets my goal.

    Thanks again, I appreciate the time you get to answer me.

    Regards