Shark workflow source code (four)

zhaozj2021-02-17  53

How to load the process definition

The last article has been discussed, the loading of the process is only needed; how to load the problem.

First give the flow defined load, the serial number corresponds to the explanation of the following:

/ *** Enter the process definition file name, return to the process-defined package ID

* /

Public string packageload (String Xpdlname) throws myexception

{

/ / (1) Return library manager

RepositoryMgr RM = Shark.getInstance (). GetRepositoryManager ();

/ / (2) Get the package ID with the library manager

String pkgid = rm.getialkageId (xpdlname);

// (3) Get a package manager

PackageAdministration PA = Shark.getInstance (). GetAdmininterface (). GetPackageAdministration ();

IF (! pa.ispackagependaged (pkgid))

{

Try

{

/ / (4) Loading process definition

PA.OpenPackage (XPDLNAME);

}

Catch (Exception E)

{

Throw new myexception (e);

}

}

Return RM.GetPackageId (XPDLNAME);

}

(1) Return to the library manager

This feature is actually implemented by SharkenGineManger, as follows:

Public repositorymgr getRepositoryManager () {

Return SharkenGineManager.getInstance (). getObjectFactory (). CreateRepositoryManager ();

}

The implementation class of repositorymgr in Shark is repositoryManager

(2) Get package ID with library manager

When this feature is implemented, the full process definition under Sharkutilities.external_Packages_Repository is removed, and the file name is performed.

(3) After getting the package ID, the remaining things will be completed by the packageadministration.

Author's name HONGSOFT, research area: 1) Research Based on Workflow 2) Based on Java-based information security technology. Welcome to discuss Java-related issues hongbosoftware@163.com

转载请注明原文地址:https://www.9cbs.com/read-28855.html

New Post(0)