This API is used to run the batch instance from READY_FOR_REVIEW or READY_FOR_VALIDATION module to next phase in workflow. User can restart those batch instances which are accessible by their role.

Request Method: GET

Web Service URL: [http://{serverName}:{port}/dcma/rest/runBatchInstance/{batchInstanceIdentifier}]

Input Parameters for the Web Service are as follows:

Input Parameter Value Description
batchInstanceIdentifier It should contain a value of an existing batch instance Identifier. The parameter value should contain a valid batch instance identifier.

Note: Value highlighted in the curly braces in input URL should be replaces with corresponding values.Module name should end with _module.

Sample client code using apache commons http client:-

private static void runBatchInstance() {
		HttpClient client = new HttpClient();
		String url = "http://localhost:8080/dcma/rest/runBatchInstance/BI4";
		GetMethod getMethod = new GetMethod(url);
		int statusCode;
		try {
			statusCode = client.executeMethod(getMethod);
			if (statusCode == 200) {
				System.out.println("Web service executed successfully.");
				String responseBody = getMethod.getResponseBodyAsString();
				System.out.println(statusCode + " *** " + responseBody);
			} else if (statusCode == 403) {
				System.out.println("Invalid username/password.");
			} else {
				System.out.println(getMethod.getResponseBodyAsString());
			}
		} catch (HttpException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		} finally {
			if (getMethod != null) {
				getMethod.releaseConnection();
			}
		}
	}	

Was this article helpful to you?

Engineering

Comments are closed.