/** * * <!-- begin-custom-doc --> * <!-- end-custom-doc --> * * @generated Gets the String type parameter from the input by name. * @param inputData This is the activity input data. * @param processingContext XML processing context. * @param parameterName The parameter name which you want to get the value. * @return parameter value. */ public String getInputParameterStringValueByName( final N inputData, final ProcessingContext<N> processingContext, final String parameterName) { Model<N> model = processingContext.getMutableContext().getModel(); N parameter = model.getFirstChildElementByName(inputData, null, parameterName); if (parameter == null) { return ""; } return model.getStringValue(parameter); }
/** * * <!-- begin-custom-doc --> * <!-- end-custom-doc --> * * @generated Gets the String type attribute from the input by name. * @param inputData This is the activity input data. * @param processingContext XML processing context. * @param attributeName The attribute name which you want to get the value. * @return attribute value. */ public String getInputAttributeStringValueByName( final N inputData, final ProcessingContext<N> processingContext, final String attributeName) { Model<N> model = processingContext.getMutableContext().getModel(); N attribute = model.getAttribute(inputData, "", attributeName); if (attribute == null) { return ""; } return model.getStringValue(attribute); }
/** * * <!-- begin-custom-doc --> * <!-- end-custom-doc --> * * @generated Gets the Boolean type parameter from the input by name. * @param inputData This is the activity input data. * @param processingContext XML processing context. * @param parameterName The parameter name which you want to get the value. * @return parameter value. */ public boolean getInputParameterBooleanValueByName( final N inputData, final ProcessingContext<N> processingContext, final String parameterName) { Model<N> model = processingContext.getMutableContext().getModel(); N parameter = model.getFirstChildElementByName(inputData, null, parameterName); if (parameter == null) { return false; } String valueStr = model.getStringValue(parameter); return Boolean.parseBoolean(valueStr); }
/** * * <!-- begin-custom-doc --> * <!-- end-custom-doc --> * * @generated This method to get the root element of output. * @param processingContext XML processing context. * @return An XML Element. */ protected N getOutputRootElement(ProcessingContext<N> processingContext) { final FragmentBuilder<N> builder = processingContext.newFragmentBuilder(); Model<N> model = processingContext.getModel(); builder.startDocument(null, "xml"); try { builder.startElement( activityContext.getActivityOutputType().getTargetNamespace(), "RabbitMQSenderOutput", "ns0"); try { } finally { builder.endElement(); } } finally { builder.endDocument(); } N output = builder.getNode(); N resultList = model.getFirstChild(output); // begin-custom-code // add your own business code here // end-custom-code return resultList; }