How to export the new Action developed in one client ARA_TEST and Import it into another Client.

Amar GuptaAmar Gupta Mr.MumbaiPosts: 15 Explorer ✭✭

We have developed the application and its workflow which is using multiple actions. We have a list of used action by an application component e.g.

PCK.AUTOMIC_NEXUS.PUB.ACTION.RETRIEVE_ARTIFACT
PCK.AUTOMIC_HTTP.PUB.ACTION.GET

Now, we would like to write a program to export out the above mentioned actions into xml outout and import that xml file to target environment which will ensure that any new actions which are used in Source Development environment can also migrate to out Testing Environment.

How can we export/import the action using command line utility? Any suggestion could be helpful

Comments

  • Amar GuptaAmar Gupta Mr. MumbaiPosts: 15 Explorer ✭✭
    @Antoine Sauteron @Janil Purohit  - Please advise
  • Tran-Hoang HauTran-Hoang Hau Team Automic Posts: 155 Specialist ✭✭✭✭
    edited January 8
    Hello Amar Gupta you can archive the target by using Package Manager, like my example below
    I'll build the "PCK.CUSTOM_AUTOMIC_JDBC_PACKAGE" locally using command 
    ./apm build PCK.CUSTOM_AUTOMIC_JDBC_PACKAGE




    and I also can install the package using 
    apm install --from-file "C:\RM\rm7\Package.Manager_client4\bin\PCK.CUSTOM_AUTOMIC_JDBC_PACKAGE.zip"
    if you have any question please post to this thread
  • Amar GuptaAmar Gupta Mr. MumbaiPosts: 15 Explorer ✭✭
    edited January 8

    Hi Hau,

    I have looked into the documentation of APM [Documents|https://docs.automic.com/documentation/webhelp/english/ALL/components/PACKMGR/latest/All Guides/Content/PackageManager/intro.htm] but could not find much details.
    The apm utility is only working to install or build the actionpack e.g.

    .\apm build "PCK.AUTOMIC_NEXUS" -d "D:\ARA-Nomura\Test" -o "zip" -c 100 -H "localhost" -p 2217 -S "ARA_TEST" -u "XXXXXX/AUTOMIC" -pw "XXXXX"

    The PCK.AUTOMIC_NEXUS action pack is having two actions defined:
    PCK.AUTOMIC_NEXUS.PUB.ACTION.RETRIEVE_ARTIFACT
    PCK.AUTOMIC_NEXUS.PUB.ACTION.UPLOAD_ARTIFACT

    .\apm build "PCK.AUTOMIC_NEXUS.PUB.ACTION.RETRIEVE_ARTIFACT" -d "D:\ARA-Nomura\Test" -o "zip" -c 100 -H "localhost" -p 2217 -S "ARA_TEST" -u "XXXXXX/AUTOMIC" -pw "XXXXX"

    we only need to export only one action i.e. PCK.AUTOMIC_NEXUS.PUB.ACTION.RETRIEVE_ARTIFACT

    of action-pack and import to target using file.

  • Amar GuptaAmar Gupta Mr. MumbaiPosts: 15 Explorer ✭✭
    When we run the following code it says Action does not exists
    .\apm build "PCK.AUTOMIC_NEXUS.PUB.ACTION.RETRIEVE_ARTIFACT" -d "D:\ARA-Nomura\Test" -o "zip" -c 100 -H "localhost" -p 2217 -S "ARA_TEST" -u "XXXXXX/AUTOMIC" -pw "XXXXX"


  • Amar GuptaAmar Gupta Mr. MumbaiPosts: 15 Explorer ✭✭
    Do we have any method to download the specific action {used in workflow} instead of whole action-pack.?
  • Tran-Hoang HauTran-Hoang Hau Team Automic Posts: 155 Specialist ✭✭✭✭
    Hello Amar Gupta Action pack include all the single actions, so we are not providing method to download specific action since it could cause the inconsistent/wrong dependency of the whole pack
  • Tran-Hoang HauTran-Hoang Hau Team Automic Posts: 155 Specialist ✭✭✭✭

    Hi Hau,

    I have looked into the documentation of APM [Documents|https://docs.automic.com/documentation/webhelp/english/ALL/components/PACKMGR/latest/All Guides/Content/PackageManager/intro.htm] but could not find much details.
    The apm utility is only working to install or build the actionpack e.g.

    .\apm build "PCK.AUTOMIC_NEXUS" -d "D:\ARA-Nomura\Test" -o "zip" -c 100 -H "localhost" -p 2217 -S "ARA_TEST" -u "XXXXXX/AUTOMIC" -pw "XXXXX"

    The PCK.AUTOMIC_NEXUS action pack is having two actions defined:
    PCK.AUTOMIC_NEXUS.PUB.ACTION.RETRIEVE_ARTIFACT
    PCK.AUTOMIC_NEXUS.PUB.ACTION.UPLOAD_ARTIFACT

    .\apm build "PCK.AUTOMIC_NEXUS.PUB.ACTION.RETRIEVE_ARTIFACT" -d "D:\ARA-Nomura\Test" -o "zip" -c 100 -H "localhost" -p 2217 -S "ARA_TEST" -u "XXXXXX/AUTOMIC" -pw "XXXXX"

    we only need to export only one action i.e. PCK.AUTOMIC_NEXUS.PUB.ACTION.RETRIEVE_ARTIFACT

    of action-pack and import to target using file.

    I wouldn't recommend to directly modify our action, since you might not be able to upgrade the action if we have new release.
  • Amar GuptaAmar Gupta Mr. MumbaiPosts: 15 Explorer ✭✭

    Do we have any method to download the specific action {used in workflow} instead of whole action-pack.?

    We are looking for a solution for Our own Build Actions - Instead of Automic provided actions. 

  • Amar GuptaAmar Gupta Mr. MumbaiPosts: 15 Explorer ✭✭
    why we do have option to export/import via UI - for downloading and uploading - specific action - if it is not recommneded
  • Antoine SauteronAntoine Sauteron ViennaAutomic Moderator, Team Automic Posts: 823 mod
    edited January 10
    Hello @Amar Gupta

    The export feature available from the User Interface allows you to export any object created, be it an action or anything else : calendar, user, job, etc.

    Problem in your case is that Action Packs / actions always consist of a bulk of components : at least a workflow, jobs, promptsets, etc.

    When you export something from ARA using the utilities, you ensure that all components that are part of the action pack are exported at once, but if you do an xml export then it will only export the selected objects.

    Besides it's not a best practice to export bits of action packs from one environment to the other because some of their parts may be lost in the process. On the other hand the consistency of action packs between the the environments will not be guaranteed.

    Hope this helps.

    Best regards,
    Antoine
    EMEA Support: +43 57 080 90
    support@automic.com


  • Antoine SauteronAntoine Sauteron ViennaAutomic Moderator, Team Automic Posts: 823 mod
    Hi again,

    Although we do not recommend it, you can use these to import / export specific objects:

    • Automic script functions IMPORT and EXPORT
    • Java API for the Automation Engine : classes ExportObject and ImportObject
    • CLI for Automation Engine (not a supported tool) :
       OBJECTS_Export_Import.jar: Import & Export Objects and dependencies (v11.2 and up)

    Please note that using these suggestions would require a development effort at your end.

    Best regards,
    Antoine
    EMEA Support: +43 57 080 90
    support@automic.com


Sign In or Register to comment.