Package org.openbp.core.model.item.activity

Examples of org.openbp.core.model.item.activity.JavaActivityItem


   * @param context Generator context
   * @return By default, the method returns the template name read from the generator XML file
   */
  public String getTemplateName(GeneratorContext context)
  {
    JavaActivityItem activity = (JavaActivityItem) context.getItem();

    if (activity.getHandlerDefinition().getHandlerClassName() != null)
    {
      // Implementation class name specified, generate the activity source
      return super.getTemplateName(context);
    }

View Full Code Here


    {
      if (event.eventType == WizardEvent.SHOW)
      {
        if (context.isEmptyItem() && !context.isClassnameSet())
        {
          JavaActivityItem activity = (JavaActivityItem) context.getItem();

          if (activity.getHandlerDefinition().getHandlerClassName() == null)
          {
            activity.getHandlerDefinition().setHandlerClassName(ClassNameBuilderUtil.constructActivityClassName(activity));

            // Redisplay the activity in the property browser
            // We have to do this because the event was already handled by the page *before* we get called.
            JaspiraWizardObjectPage page = (JaspiraWizardObjectPage) event.wizard.getPage(pageName);
            page.handleWizardEvent(event);
View Full Code Here

   * @throws OpenBPException On error
   */
  public void executeModelObject(ModelObject mo, EngineExecutor ee)
  {
    TokenContext context = ee.getTokenContext();
    JavaActivityItem activity = (JavaActivityItem) mo;

    NodeSocket nextSocket = null;

    TokenContext oldContext = context;
    HandlerContext hc = getEngine().executeHandler(activity.getHandlerDefinition(), HandlerTypes.ACTIVITY, context, context.getCurrentSocket(), nextSocket);
    if (hc != null)
    {
      context = hc.getTokenContext();
      if (context != oldContext)
      {
        // Token context instance has changed due to rollback
        ee.setTokenContext(context);
        return;
      }

      nextSocket = hc.getNextSocket();
      if (nextSocket == null)
      {
        String msg = LogUtil.error(getClass(), "Handler of activity $0 did not provide a a socket to continue with. [{1}]", activity.getQualifier(), context);
        throw new EngineException("MissingNextSocket", msg);
      }
    }

    if (nextSocket != null)
View Full Code Here

        if (item instanceof JavaActivityItem)
        {
          // In case of activity items, change the name of the action
          // implementation class also when renaming the activity
          JavaActivityItem activity = (JavaActivityItem) item;
          String oldClassName = activity.getHandlerDefinition().getHandlerClassName();
          if (oldClassName != null && oldName != null)
          {
            // ...substitute ".OldName" to ".NewName"
            String className = StringUtil.substitute(oldClassName, "." + oldName, "." + newName);

            // Update the object
            activity.getHandlerDefinition().setHandlerClassName(className);
          }
        }

        // Get the item type editor associated with this item
        ItemEditor editor = ItemEditorRegistry.getInstance().lookupItemEditor(item.getItemType());
View Full Code Here

    if (complete)
    {
      if (propertyName.equals("Name"))
      {
        JavaActivityItem activity = (JavaActivityItem) editedObject;

        Model model = activity.getModel();
        if (model != null)
        {
          // If there is an implementation class name specified...
          String oldName = activity.getName();
          String oldClassName = activity.getHandlerDefinition().getHandlerClassName();
          if (oldClassName != null && oldName != null)
          {
            // ...substitute ".OldName" to ".NewName"
            String newName = (String) propertyValue;
            String className = StringUtil.substitute(oldClassName, "." + oldName, "." + newName);

            // Update the object
            activity.getHandlerDefinition().setHandlerClassName(className);
            propertyEditor.getOwner().reloadProperty("HandlerClassName");
          }
        }
      }
    }
View Full Code Here

TOP

Related Classes of org.openbp.core.model.item.activity.JavaActivityItem

Copyright © 2018 www.massapicom. 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.