Examples of SharkConnection


Examples of org.enhydra.shark.api.client.wfservice.SharkConnection

     * @param processDefinitionData
     * @return
     * @throws Exception
     */
    public String processUploadWithoutUpdateMapping(String packageId, byte[] processDefinitionData) throws Exception {
        SharkConnection sc = null;
        String instanceId = null;

        try {
            sc = connect();
            WMSessionHandle sessionHandle = sc.getSessionHandle();
            PackageAdministration pa = getSharkPackageAdmin(sessionHandle);
            WMEntity entity = null;

            //update package
            if (packageId != null && packageId.trim().length() > 0) {
View Full Code Here

Examples of org.enhydra.shark.api.client.wfservice.SharkConnection

     * @return
     * @throws Exception
     */
    public String processUpload(String packageId, byte[] processDefinitionData) throws Exception {

        SharkConnection sc = null;
        String instanceId = null;

        try {

            sc = connect();

            WMSessionHandle sessionHandle = sc.getSessionHandle();
            PackageAdministration pa = getSharkPackageAdmin(sessionHandle);

            WMEntity entity = null;
            //update package
            if (packageId != null && packageId.trim().length() > 0) {
View Full Code Here

Examples of org.enhydra.shark.api.client.wfservice.SharkConnection

     * @param packageId
     * @param version
     */
    public void processDeleteAndUnloadVersion(String packageId, String version) {

        SharkConnection sc = null;

        try {

            sc = connect();

            // delete process instances
            LogUtil.info(getClass().getName(), "Deleting running processes for " + packageId + " version " + version);
            Shark shark = Shark.getInstance();
            ExecutionAdministration ea = shark.getExecutionAdministration();
            WAPI wapi = shark.getWAPIConnection();
            WfProcessIterator wpi = sc.get_iterator_process();
            ProcessFilterBuilder fb = shark.getProcessFilterBuilder();
            WMSessionHandle sessionHandle = sc.getSessionHandle();
            WMFilter filter1 = fb.addPackageIdEquals(sessionHandle, packageId);
            WMFilter filter2 = fb.addVersionEquals(sessionHandle, version);
            WMFilter filter = fb.and(sessionHandle, filter1, filter2);
            wpi.set_query_expression(fb.toIteratorExpression(sessionHandle, filter));
            WfProcess[] procs = wpi.get_next_n_sequence(0);
View Full Code Here

Examples of org.enhydra.shark.api.client.wfservice.SharkConnection

     * Deletes all versions for a package together with its associated process instances.
     * @param packageId
     */
    public void processDeleteAndUnload(String packageId) {

        SharkConnection sc = null;

        try {

            sc = connect();

            // delete process instances
            LogUtil.info(getClass().getName(), "Deleting all running processes for " + packageId);
            Shark shark = Shark.getInstance();
            ExecutionAdministration ea = shark.getExecutionAdministration();
            WMSessionHandle sessionHandle = sc.getSessionHandle();
            PackageAdministration pa = getSharkPackageAdmin(sessionHandle);
            WAPI wapi = shark.getWAPIConnection();
            WfProcessIterator wpi = sc.get_iterator_process();
            ProcessFilterBuilder fb = shark.getProcessFilterBuilder();
            WMFilter filter = fb.addPackageIdEquals(sessionHandle, packageId);
            wpi.set_query_expression(fb.toIteratorExpression(sessionHandle, filter));
            WfProcess[] procs = wpi.get_next_n_sequence(0);
            for (int i = 0; i < procs.length; i++) {
View Full Code Here

Examples of org.enhydra.shark.api.client.wfservice.SharkConnection

     * @param rows
     * @return
     */
    public Collection<WorkflowProcess> getRunningProcessList(String packageId, String processId, String processName, String version, String sort, Boolean desc, Integer start, Integer rows) {

        SharkConnection sc = null;
        Collection<WorkflowProcess> runningProcessList = new ArrayList<WorkflowProcess>();
        try {

            sc = connect();

            WfProcessIterator pi = sc.get_iterator_process();

            String sharkExpression = "stateequals.(\"open.running\")";
            String sqlExpression = "State = (SELECT  oid  FROM SHKProcessStates WHERE  Name  = 'open.running')";

            if (packageId != null && packageId.trim().length() > 0) {
View Full Code Here

Examples of org.enhydra.shark.api.client.wfservice.SharkConnection

     * @param version
     * @return
     */
    public int getRunningProcessSize(String packageId, String processId, String processName, String version) {

        SharkConnection sc = null;
        try {

            sc = connect();
            int size = 0;
            Map stateMap = getProcessStateMap();
View Full Code Here

Examples of org.enhydra.shark.api.client.wfservice.SharkConnection

     * @param rows
     * @return
     */
    public Collection<WorkflowProcess> getCompletedProcessList(String packageId, String processId, String processName, String version, String sort, Boolean desc, Integer start, Integer rows) {

        SharkConnection sc = null;
        Collection<WorkflowProcess> runningProcessList = new ArrayList<WorkflowProcess>();
        try {

            sc = connect();

            WfProcessIterator pi = sc.get_iterator_process();

            String sharkExpression = "statenotequals.(\"open.running\")";
            String sqlExpression = "State IN (SELECT  oid  FROM SHKProcessStates WHERE  Name  <> 'open.running')";

            if (packageId != null && packageId.trim().length() > 0) {
View Full Code Here

Examples of org.enhydra.shark.api.client.wfservice.SharkConnection

     * @param version
     * @return
     */
    public int getCompletedProcessSize(String packageId, String processId, String processName, String version) {

        SharkConnection sc = null;
        try {

            sc = connect();
            int size = 0;
            Map stateMap = getProcessStateMap();
View Full Code Here

Examples of org.enhydra.shark.api.client.wfservice.SharkConnection

     * @param processId
     * @return
     */
    public WorkflowProcess getRunningProcessById(String processId) {

        SharkConnection sc = null;
        WorkflowProcess workflowProcess = new WorkflowProcess();
        try {
            if (processId == null || processId.trim().length() == 0) {
                return null;
            }

            sc = connect();

            Shark shark = Shark.getInstance();
            WfProcessIterator pi = sc.get_iterator_process();
            ProcessFilterBuilder pieb = shark.getProcessFilterBuilder();
            WMSessionHandle sessionHandle = sc.getSessionHandle();

            WMFilter filter = new WMFilter();

            if (processId != null && processId.trim().length() > 0) {
                filter = pieb.addIdEquals(sessionHandle, processId);
View Full Code Here

Examples of org.enhydra.shark.api.client.wfservice.SharkConnection

     * @param desc
     * @return
     */
    public Collection<WorkflowActivity> getActivityList(String processId, Integer start, Integer rows, String sort, Boolean desc) {

        SharkConnection sc = null;
        Collection<WorkflowActivity> activityList = new ArrayList<WorkflowActivity>();

        int activitySize = 0;

        try {
            activitySize = getActivitySize(processId);


            sc = connect();

            Shark shark = Shark.getInstance();
            WfActivityIterator ai = sc.get_iterator_activity();
            ActivityFilterBuilder aieb = shark.getActivityFilterBuilder();
            WMSessionHandle sessionHandle = sc.getSessionHandle();
            AdminMisc admin = shark.getAdminMisc();

            WMFilter filter = new WMFilter();

            if (processId != null && processId.trim().length() > 0) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.