Skip to content

Instantly share code, notes, and snippets.

View danielezonca's full-sized avatar

Daniele Zonca danielezonca

  • Red Hat
  • Milan, Italy
View GitHub Profile
/*
* Copyright 2018 Red Hat, Inc. and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
public enum TypeEnum {
INT {
@Override
protected boolean acceptInternal(Object parameter) {
Class<?> clazz = parameter.getClass();
return clazz.isAssignableFrom(Integer.class) || clazz.isAssignableFrom(int.class);
}
@Override
@danielezonca
danielezonca / WorkItemNPE.java
Last active April 24, 2018 14:39
WorkItem instance reset (jBPM 6.x)
package org.jbpm.kie.test;
import java.util.Collection;
import org.drools.core.command.impl.GenericCommand;
import org.drools.core.command.impl.KnowledgeCommandContext;
import org.jbpm.kie.services.impl.KModuleDeploymentUnit;
import org.jbpm.services.api.ProcessService;
import org.jbpm.services.api.model.DeploymentUnit;
import org.jbpm.workflow.instance.WorkflowProcessInstance;