I’m trying to use a parameter for a REST client, and I can´t find a way to provide the correct value to the conector.
I’t seems that it is validating the parameter VALUE against this regular expression:([1]+|^$)[a-zA-Z0-9$]*
this is the stacktrace:
org.bonitasoft.engine.expression.exception.SInvalidExpressionException: PROCESS_DEFINITION_ID=5089973527243206230 | PROCESS_NAME=Actualización de Precios Sitio Web | PROCESS_VERSION=1.2 | PROCESS_INSTANCE_ID=17011 | ROOT_PROCESS_INSTANCE_ID=17011 | FLOW_NODE_DEFINITION_ID=7951134039297032835 | FLOW_NODE_INSTANCE_ID=340053 | FLOW_NODE_NAME=Login Oracle | CONNECTOR_IMPLEMENTATION_CLASS_NAME=Login | CONNECTOR_INSTANCE_ID=340022 | The expression content does not matches with (^[a-zA-Z]+|^\$)[a-zA-Z0-9$]* in expression: SExpressionImpl [name=login_form_port, content=login_form_port, returnType=java.lang.String, dependencies=[], expressionKind=ExpressionKind [interpreter=NONE, type=TYPE_PARAMETER]]
at org.bonitasoft.engine.expression.ParameterExpressionExecutorStrategy.validate(ParameterExpressionExecutorStrategy.java:90)
at org.bonitasoft.engine.expression.impl.ExpressionServiceImpl.validateExpression(ExpressionServiceImpl.java:107)
at org.bonitasoft.engine.expression.impl.ExpressionServiceImpl.evaluate(ExpressionServiceImpl.java:81)
at org.bonitasoft.engine.core.expression.control.api.impl.ExpressionResolverServiceImpl.evaluateExpressionWithResolvedDependencies(ExpressionResolverServiceImpl.java:213)
at org.bonitasoft.engine.core.expression.control.api.impl.ExpressionResolverServiceImpl.evaluateExpressionWithResolvedDependencies(ExpressionResolverServiceImpl.java:208)
at org.bonitasoft.engine.core.expression.control.api.impl.ExpressionResolverServiceImpl.evaluateExpressionWithResolvedDependencies(ExpressionResolverServiceImpl.java:208)
at org.bonitasoft.engine.core.expression.control.api.impl.ExpressionResolverServiceImpl.evaluateExpressionWithResolvedDependencies(ExpressionResolverServiceImpl.java:208)
at org.bonitasoft.engine.core.expression.control.api.impl.ExpressionResolverServiceImpl.evaluateExpressionsFlatten(ExpressionResolverServiceImpl.java:120)
at org.bonitasoft.engine.core.expression.control.api.impl.ExpressionResolverServiceImpl.evaluate(ExpressionResolverServiceImpl.java:83)
at org.bonitasoft.engine.core.connector.impl.ConnectorServiceImpl.evaluateInputParameters(ConnectorServiceImpl.java:295)
is this really the expected behaviour? Should I provide parameter in another way?
From the source code , I got this comment:
@Override
public void validate(final SExpression expression) throws SInvalidExpressionException {
super.validate(expression);
**// $ can be part of variable name**
if (!expression.getContent().matches("(^[a-zA-Z]+|^\\$)[a-zA-Z0-9$]*")) {
throw new SInvalidExpressionException("The expression content does not matches with (^[a-zA-Z]+|^\\$)[a-zA-Z0-9$]* in expression: " + expression,
expression.getName());
}
}
so I understand why there is such validation, but it prevents me from using ":" in a parameter, or use a port number (it should start with a letter).
Thank you
Germán
a-zA-Z ↩︎