Tuesday, 3 June 2014

K2 Workflow and K2 SmartObjects Deployment Process


To facilitate transferring the process between environments the K2 Deployment Package is used. A deployment package is created when the project is successfully built with no errors. The package is copied and relocated to the target environment (e.g. Test or Production). When available in the environment, the MSBUILD utility from Microsoft is used to deploy the process in the new environment.

1: Build the process and create the deployment package
The K2 blackpearl business application is developed in the development environment. Quality Assurance and Testing is performed in this environment as well. Once complete, the process is built and deployed to the development environment. This ‘final’ version of the process is then available as the Deployment Package.

2: Using the deploy package in another environment
Once the deployment package is copied to the new environment, the MSBUILD application is used to perform the deployment task. This command line application will enable the developer to test all the environmental variables and resources to ensure that the business application will function once deployed. When the environment has been verified as compatible with the business application, it is then deployed to the K2 Server for use.

From K2 Process to Deployment Package
 The Create Deploy Package option is available from the Solution Explorer in the K2 Designer for Visual Studio. Once the development cycle for a process is complete (i.e., the process has been built and tested appropriately), the deploy package is created.

This is done by performing the following steps in the K2 Designer for Visual Studio:
  1. Right-click on the project in the Solution Explorer
  2. Select the Create Deploy Package option
  3. Monitor the progress using the information bar in the lower left hand corner. Visual Studio will tell you when it is complete.
  4. When the package has been created, browse to the location on the file system
What is a Deploy Package?

The deploy package is a collection of files which the MSBUILD application will use to deploy the process in the new environment. Which are available in the following location see the following picture (to see that folder right click on the k2 workflow solution and open with windows explorer from that open obj folder and then open Debug folder there you can find the Deployment Folder and one .dll and one .exe file there we need to copied these files to new environment.



Additional files, including the MSBUILD file, are located in the deployment folder


Using the MSBUILD Application

    1.  Open a command prompt (clicks on Start > Run and type in CMD and press ENTER)
    2.  At the prompt, type in cd C:\Windows\Microsoft.NET\Framework\V2.0.50727 and  press  Enter. 
         see following image.

     



   
3. And then type MSBUILD and give one space ,Next step to drag and drop the WorkFlows.msbuild(this file is available in  copied deployment folder ) file into the command prompt. And press enter

The k2 workflow deployment completed with some success message.

This the same process for the K2 Smart Object deployment.


No comments:

Post a Comment