This Custom plugin script can be used to handle scenarios where rest response from WS provider contains attachment file(zip etc.) and it gets corrupted due to encoding. This can be implemented by a minor change in existing Process Flow design.
1. Create a New Custom Plugin activity using below script:
import org.apache.commons.io.IOUtils;
context.put("restResponse",IOUtils.toByteArray(inputStream));
2. Open the existing Process Flow.
3. Remove the existing Context target activity.
4. Use the Custom Plugin created in step 1 in place of Context target activity.
5. Save the Process Designer.
Comments
0 comments
Article is closed for comments.