Project

General

Profile

« Previous | Next » 

Revision 41530

failure of wf templates

View differences:

modules/dnet-msro-service/branches/workflow_templates/src/main/java/eu/dnetlib/msro/workflows/nodes/LaunchWorkflowTemplateJobNode.java
49 49
						@Override
50 50
						public void onSuccess() {
51 51
							log.debug("Child workflow has been completed successfully");
52

  
53 52
							token.setNextArc(Arc.DEFAULT_ARC);
54 53
							token.release();
55 54
						}
......
58 57
						public void onFail() {
59 58
							log.error("Child workflow is failed");
60 59
							token.releaseAsFailed("Child workflow is failed");
61
							token.release();
62 60
						}
63 61
					});
64 62
			if (log.isDebugEnabled()) {
......
67 65
		} catch (final Throwable e) {
68 66
			log.error("got exception while launching child workflow", e);
69 67
			token.releaseAsFailed(e);
70
			token.release();
71 68
		}
72 69
	}
73 70

  
modules/dnet-msro-service/branches/workflow_templates/src/main/java/eu/dnetlib/msro/workflows/nodes/LaunchWorkflowJobNode.java
1 1
package eu.dnetlib.msro.workflows.nodes;
2 2

  
3
import org.apache.commons.logging.Log;
4
import org.apache.commons.logging.LogFactory;
5
import org.springframework.beans.factory.annotation.Autowired;
6

  
3 7
import eu.dnetlib.msro.workflows.graph.Arc;
4 8
import eu.dnetlib.msro.workflows.procs.Token;
5 9
import eu.dnetlib.msro.workflows.procs.WorkflowExecutor;
6 10
import eu.dnetlib.msro.workflows.util.ProcessCallback;
7
import org.apache.commons.logging.Log;
8
import org.apache.commons.logging.LogFactory;
9
import org.springframework.beans.factory.annotation.Autowired;
10 11

  
11 12
/**
12 13
 * Created by michele on 18/11/15.
......
23 24
	public final void execute(final Token token) {
24 25

  
25 26
		try {
26
			final String procId = executor.startWorkflow(getWfId(), null, new ProcessCallback() {
27
			final String procId = this.executor.startWorkflow(getWfId(), null, new ProcessCallback() {
27 28

  
28 29
				@Override
29 30
				public void onSuccess() {
30 31
					log.debug("Child workflow has been completed successfully");
31

  
32 32
					token.setNextArc(Arc.DEFAULT_ARC);
33 33
					token.release();
34 34
				}
......
37 37
				public void onFail() {
38 38
					log.error("Child workflow is failed");
39 39
					token.releaseAsFailed("Child workflow is failed");
40
					token.release();
41 40
				}
42 41
			});
43 42
			if (log.isDebugEnabled()) {
44 43
				log.debug("The child workflow [" + getWfId() + "] is starting with procId: " + procId);
45 44
			}
46
		} catch (Throwable e) {
45
		} catch (final Throwable e) {
47 46
			log.error("got exception while launching child workflow", e);
48 47
			token.releaseAsFailed(e);
49
			token.release();
50 48
		}
51 49
	}
52 50

  
53 51
	public String getWfId() {
54
		return wfId;
52
		return this.wfId;
55 53
	}
56 54

  
57 55
	public void setWfId(final String wfId) {

Also available in: Unified diff