Custom Snap

I can’t able to get the values from previous snap.I used mapper to set a value and retrieve using expression from previous snap but getting error alike cannot set null value.

@General(title = “Example snap”, purpose = “”, author = “”)
@Category(snap = SnapCategory.READ)
@Version(snap = 1)
@Inputs(min = 1, max = 1, accepts = { ViewType.DOCUMENT })
@Outputs(min = 1, max = 1, offers = { ViewType.DOCUMENT })
@Errors(min = 1, max = 1, offers = { ViewType.DOCUMENT })
public class ExampleSnap implements Snap

private static final String CACHE_DATA_ID = "Key";

private String Key;
private String valueCategory;

private DocumentUtility documentUtility;

private InputViews inputViews;
private OutputViews outputViews;
private ErrorViews errorViews;

public void defineProperties(final PropertyBuilder propBuilder)
	propBuilder.describe(CACHE_DATA_ID, CACHE_DATA_ID).expression().schemaAware(SnapProperty.DecoratorType.ACCEPTS_SCHEMA)


public void configure(PropertyValues propertyValues) throws ConfigurationException
		valueCategory = propertyValues.getAsExpression(CACHE_DATA_ID).eval(null);

Please give some suggestion.


We have posted a few blog posts regarding custom snap development on our website. I am sending you the URL for the 3 custom snaps developed by us that we have published so far, I believe you will find them useful. If you have any questions you can reach out to us.

Sleep snap:
Flow Reset snap:
Generic JDBC - Table Operation snap:


1 Like

Cant able to acces the URL’s above.

Many thanks for taking time and replying for the post.


You’ll need to evaluate the ExpressionProperty against the input document, not null. This cannot be done in the configure() method, use process() instead:

ExpressionProperty valueCategoryExp;
String valueCategory;

public void configure(PropertyValues propertyValues) throws ConfigurationException {
	valueCategoryExp = propertyValues.getAsExpression(CACHE_DATA_ID);

protected void process(Document document, String s) {
        valueCategory = valueCategoryExp.eval(document);