Guessing you figured this out on your own, but if you wanted to use a Script activity one way to do what you want is when you're creating your data associations drag the "Expression" icon in the middle and double click the icon in the middle you just added:
- Get out of the Simple expression mode and into the XPath expression mode by clicking the dropdown in the upper left corner -> click "XPath Exp".
- In the Functions dropdown on the right, click "Conversion Functions" -> click "number" and then insert it into the expression.
- In the Variables list, select your string variable and insert it into the number function so that it looks something like this: number(bpmn:getDataObject('myStringVariable'))
- Click OK
- Click your expression icon in the middle and drag it over your decimal variable.
To have it evaluate and return a Boolean expression in your Script activity, add a Boolean process variable and add an XPath expression as described above except have the logic be this: number(bpmn:getDataObject('myStringVariable')) > .4 (the "greater than" shown above is added to the expression by clicking "Logical Functions" from the functions dropdown). Click OK and drag your expression icon over your Boolean variable.