/** * Create a flow configuration * It differs from {@link FlowConfigClient} in a way that it returns FlowStatusId, * which can be used to find the FlowExecutionId * @param flowConfig FlowConfig to be used to create the flow * @return FlowStatusId * @throws RemoteInvocationException */ public FlowStatusId createFlowConfig(FlowConfig flowConfig) throws RemoteInvocationException { LOG.debug("createFlowConfig with groupName " + flowConfig.getId().getFlowGroup() + " flowName " + flowConfig.getId().getFlowName()); CreateIdRequest<ComplexResourceKey<FlowId, FlowStatusId>, FlowConfig> request = _flowconfigsV2RequestBuilders.create().input(flowConfig).build(); ResponseFuture<IdResponse<ComplexResourceKey<FlowId, FlowStatusId>>> flowConfigResponseFuture = _restClient.get().sendRequest(request); return createFlowStatusId(flowConfigResponseFuture.getResponse().getLocation().toString()); }
/** * Create a flow configuration * It differs from {@link FlowConfigClient} in a way that it returns FlowStatusId, * which can be used to find the FlowExecutionId * @param flowConfig FlowConfig to be used to create the flow * @return FlowStatusId * @throws RemoteInvocationException */ public FlowStatusId createFlowConfig(FlowConfig flowConfig) throws RemoteInvocationException { LOG.debug("createFlowConfig with groupName " + flowConfig.getId().getFlowGroup() + " flowName " + flowConfig.getId().getFlowName()); CreateIdRequest<ComplexResourceKey<FlowId, FlowStatusId>, FlowConfig> request = _flowconfigsV2RequestBuilders.create().input(flowConfig).build(); ResponseFuture<IdResponse<ComplexResourceKey<FlowId, FlowStatusId>>> flowConfigResponseFuture = _restClient.get().sendRequest(request); return createFlowStatusId(flowConfigResponseFuture.getResponse().getLocation().toString()); }