Package org.uengine.kernel

Source Code of org.uengine.kernel.StatusReportActivity

package org.uengine.kernel;

import java.util.Map;

import org.metaworks.FieldDescriptor;
import org.metaworks.Type;
import org.metaworks.inputter.SelectInput;
import org.uengine.kernel.GlobalContext;
import org.uengine.processdesigner.ProcessDesigner;
import org.uengine.util.UEngineUtil;

/**
* @author Jinyoung Jang
*/

public class StatusReportActivity extends DefaultActivity{
  private static final long serialVersionUID = org.uengine.kernel.GlobalContext.SERIALIZATION_UID;

  public static void metaworksCallback_changeMetadata(Type type){
    FieldDescriptor fd;
   
    fd = type.getFieldDescriptor("FieldName");
    fd.setInputter(new SelectInput(new String[]{"Info","Ext1","Ext2","Ext3","Ext4","Ext5","Ext6","Ext7","Ext8","Ext9","Ext10"}));
  }
 
 
  String content;
    public String getContent() {
      return content;
    }
    public void setContent(String string) {
      content = string;
    }
   
  String fieldName;
    public String getFieldName() {
      return fieldName;
    }
    public void setFieldName(String fieldName) {
      this.fieldName = fieldName;
    }
   
  public StatusReportActivity(){
    super("Mark Status");
    setHidden(true);
  }
 
  protected void executeActivity(ProcessInstance instance) throws Exception{
    String contentEvaluated = evaluateContent(instance, getContent()).toString();
   
    if(instance instanceof EJBProcessInstance){
      ((EJBProcessInstance)instance).getProcessInstanceDAO().set(getFieldName(), contentEvaluated);
    }else
      instance.setInfo(contentEvaluated);
    fireComplete(instance);
  }

 
}

TOP

Related Classes of org.uengine.kernel.StatusReportActivity

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.