OpenPj / alfresco-process-services-project-sdk

The Alfresco Process Services SDK based on Apache Maven and Docker, includes support for rapid and standard development, testing, packaging, versioning and release of your APS integration and extension projects
Other
27 stars 19 forks source link

Automatic process definition deployment #44

Open nschwalbe opened 2 years ago

nschwalbe commented 2 years ago

Hello,

thanks for creating this promising SDK project! I'm currently evaluating it and I have a question regarding to deploy a process definition. Is it possible to automatically deploy a bpmn model placed in /aps-extensions-jar/src/main/resources/apps? I copied the 4-eyes app from test resources to main resources but it is not automatically deployed. Or do I misunderstand the documentation? I also found this community question and I'm wondering if I need to implement the "auto deployer" by myself? https://hub.alfresco.com/t5/alfresco-process-services/how-to-auto-deploy-a-bpmn-model-to-aps/td-p/226253

Best regards, Nathanael

OpenPj commented 2 years ago

Hi Nathanael,

you are welcome 😄 Currently the unique way to deploy app available in the SDK is to use the REST API. The reason for that is because the main goal was to execute unit and integration tests.

Take a look at the first step of the integration test class here: https://github.com/OpenPj/alfresco-process-services-project-sdk/blob/master/activiti-app-integration-tests/src/test/java/com/activiti/sdk/integrationtests/FourEyesAppIT.java

This part of the code (row 87) will deploy your app in APS:

// Importing the Four Eyes App in APS
IntegrationTestUtils.importApp(appZipFile, ACTIVITI_APP_USERNAME, ACTIVITI_APP_PASSWORD, BASE_PATH_PROTOCOL, BASE_PATH_HOSTNAME, BASE_PATH_PORT);

We could use the Java API code used in the unit test sample for implementing something like a bootstrapper component for this purporse. We'll definitely would like to have something like you are asking for and we also discussed internally at Zia.

I leave this issue open for using it as the main reference for this.

nschwalbe commented 2 years ago

Hi Piergiorgio,

thanks for your answer! Just for background information for your internal discussion: We like to build an APS docker image with the extension jar and deploy it to different stages from dev to prod without manual process deployment.

Best regards, Nathanael

OpenPj commented 2 years ago

We are trying to create an APS CLI for covering some different purposes related to system administration: https://github.com/OpenPj/alfresco-process-services-project-sdk/issues/55