Search in sources :

Example 1 with InputData

use of org.wso2.carbon.identity.workflow.mgt.bean.metadata.InputData in project carbon-identity-framework by wso2.

the class AbstractTemplate method getParametersMetaData.

/**
 * Retrieve template specific metadata
 *
 * @return ParametersMetaData object that is contain all the template specific parameter metadata.
 */
public ParametersMetaData getParametersMetaData() throws WorkflowException {
    if (parametersMetaData != null) {
        ParameterMetaData[] parameterMetaData = parametersMetaData.getParameterMetaData();
        for (ParameterMetaData metaData : parameterMetaData) {
            if (metaData.isIsInputDataRequired()) {
                InputData inputData = getInputData(metaData.getName());
                metaData.setInputData(inputData);
            }
        }
    }
    return parametersMetaData;
}
Also used : InputData(org.wso2.carbon.identity.workflow.mgt.bean.metadata.InputData) ParameterMetaData(org.wso2.carbon.identity.workflow.mgt.bean.metadata.ParameterMetaData)

Example 2 with InputData

use of org.wso2.carbon.identity.workflow.mgt.bean.metadata.InputData in project siddhi by wso2.

the class StreamFunctionProcessor method processEventChunk.

@Override
protected void processEventChunk(ComplexEventChunk<StreamEvent> streamEventChunk, Processor nextProcessor, StreamEventCloner streamEventCloner, ComplexEventPopulater complexEventPopulater) {
    while (streamEventChunk.hasNext()) {
        ComplexEvent complexEvent = streamEventChunk.next();
        Object[] outputData;
        switch(attributeExpressionLength) {
            case 0:
                outputData = process((Object) null);
                complexEventPopulater.populateComplexEvent(complexEvent, outputData);
                break;
            case 1:
                outputData = process(attributeExpressionExecutors[0].execute(complexEvent));
                complexEventPopulater.populateComplexEvent(complexEvent, outputData);
                break;
            default:
                Object[] inputData = new Object[attributeExpressionLength];
                for (int i = 0; i < attributeExpressionLength; i++) {
                    inputData[i] = attributeExpressionExecutors[i].execute(complexEvent);
                }
                outputData = process(inputData);
                complexEventPopulater.populateComplexEvent(complexEvent, outputData);
        }
    }
    nextProcessor.process(streamEventChunk);
}
Also used : ComplexEvent(org.wso2.siddhi.core.event.ComplexEvent)

Example 3 with InputData

use of org.wso2.carbon.identity.workflow.mgt.bean.metadata.InputData in project carbon-identity-framework by wso2.

the class AbstractWorkflow method getParametersMetaData.

/**
 * Can be retrieve workflow implementation specific meta data
 *
 * @return
 * @throws WorkflowException
 */
public ParametersMetaData getParametersMetaData() throws WorkflowException {
    if (parametersMetaData != null) {
        ParameterMetaData[] parameterMetaData = parametersMetaData.getParameterMetaData();
        for (ParameterMetaData metaData : parameterMetaData) {
            if (metaData.isIsInputDataRequired()) {
                InputData inputData = getInputData(metaData);
                metaData.setInputData(inputData);
            }
        }
    }
    return parametersMetaData;
}
Also used : InputData(org.wso2.carbon.identity.workflow.mgt.bean.metadata.InputData) ParameterMetaData(org.wso2.carbon.identity.workflow.mgt.bean.metadata.ParameterMetaData)

Aggregations

InputData (org.wso2.carbon.identity.workflow.mgt.bean.metadata.InputData)2 ParameterMetaData (org.wso2.carbon.identity.workflow.mgt.bean.metadata.ParameterMetaData)2 ComplexEvent (org.wso2.siddhi.core.event.ComplexEvent)1