Workflow as Independent Module Deployment Support
Workflow as Independent Module Deployment Support
Internal Maven Repository Address
Maven Repository (http://192.168.176.10:8081/nexus/)
Note that Maven coordinates mentioned below can be obtained from this repository.
Workflow Module
Module structure diagram:
Workflow Webapp
Workflow REST service module, providing workflow service, workflow resource service, and workflow management service.
Note that workflow service and workflow resource service are basically the same as IGServer interface standards, but lack some additional features with IGServer business, such as service directory.
The workflow management service provides a simplified version of management service, providing workflow list query, import, export, and delete interfaces. These services are not publicly exposed in IGServer, so these services have no correspondence with IGServer management services. Here, the most basic workflow service management capabilities in IGServer are extracted after removing some business dependencies.
This process is just a demo program for IGServer to provide Webapp externally. It does not have any business itself, only some Springboot configurations. Users can build their own workflow Webapp.
<artifactId>mapgis-igs-workflow-standalone-webapp</artifactId>
<groupId>com.zondy.mapgis.igs</groupId>
<version>10.x.x.x</version>When building your own workflow Webapp, if you need to enable built-in REST services, please add the following dependency and enable the configuration workflow.standalone.restEnabled=true
<artifactId>mapgis-igs-workflow-service</artifactId>
<groupId>com.zondy.mapgis.igs</groupId>
<version>10.x.x.x</version>For standalone deployment configuration class details, after adding dependencies, IDEA can auto-complete:
@Getter
@Setter
@ConfigurationProperties(prefix = "workflow.standalone")
public class WorkflowStandaloneConfig {
/**
* Whether to enable REST services
*/
private boolean restEnabled;
/**
* Base address of workflow service, default is /igs/rest/services
*/
private String restServicesBaseUrl;
/**
* Base address of workflow service, default is /igs/rest/manager
*/
private String restManagerBaseUrl;
}In the igserver_for_java installation package, startup scripts for this process are integrated in the bin directory: start-workflow-standalone-webapp.bat, start-workflow-standalone-webapp.sh. This process needs to depend on zookeeper and WorkflowServerHost for RPC communication, so please use startup-workflow-standalone.bat, startup-workflow-standalone.sh to start the service.
The default port of this process is 8099. If you need to view the REST service interfaces supported by the workflow standalone module, please refer to http://localhost:8099/swagger-ui/index.html
WorkflowServerHost
Workflow execution process. Since workflow task execution runs in an independent process, users send requests to Workflow Webapp, which processes tasks and schedules tasks to specified workflow execution processes. Inter-process communication is done through dubbo RPC.
FunctionLibraryServerHost
This module provides socket services depended on when building workflows using desktop tools (IGSWorkflow.exe), providing function library parsing and execution services.
In the igserver_for_java installation package, startup scripts for this process are integrated in the bin directory: start-function-library-server-host.bat
Development Kit File List
workflow-standalone-webapp
├── workflow #Workflow processes, function library, sub-files and folders below are all needed
├── zookeeper #Required for RPC communication
├── bin
│ ├── startup-workflow-standalone.bat(startup-workflow-standalone.sh) #Total startup script for workflow webapp, including webapp, zookeeper
│ ├── set-env.bat(set-env.sh)#Set environment variables
│ ├── shutdown.bat(shutdown.sh) #Shutdown process
│ ├── env.config #Developer dongle configuration
│ ├── start-function-library-server-host.bat(start-function-library-server-host.sh) #Function library service startup script
│ └── start-workflow-standalone-webapp.bat(start-workflow-standalone-webapp.sh) #Start workflow webapp separately
└── lib
├── workflow-host-*.jar #Workflow execution process
├── function-library-server-host-*.jar #Function library service process
└── workflow-standalone-webapp-*.jar #Demo webapp, get from repository, not included in installation packageThe igserver workflow standalone module comes with igserver function libraries. The database exists in workflow\FunctionLibrary. The function implementation jar package igserver-workflow-library.jar is located in workflow\FunctionLibrary\GIS\MapGIS\jar folder. When users do not need to use igserver's built-in functions, they can clear the database and delete igserver-workflow-library.jar. Then they can put their own developed jar packages in the corresponding directory. The igserver workflow standalone module builds projects separately depending on whether kernel interfaces are needed:
If the developed jar package depends on kernel interfaces, the workflow-standalone-webapp project directory must be stored in the same directory as program. Considering the authorization issues caused by kernel dependencies, it is best not to set Java environment variables on the server. The project startup uses the Java environment that comes with the program directory by default.
If the developed jar package does not depend on kernel interfaces, the entire project will be very lightweight. There will be no program directory, and correspondingly no Java environment that comes with the program directory. Therefore, the server needs to set up the Java environment in advance.