public java.util.UUID Getstateid(final int p_Index) {
    Ooaofooa.log.println(
        ILogger.OPERATION,
        "Instance State Machine",
        " Operation entered: InstanceStateMachine::Getstateid");
    final ModelRoot modelRoot = getModelRoot();
    java.util.UUID v_id = Gd_c.Null_unique_id();

    StateMachineState_c[] v_states =
        StateMachineState_c.getManySM_STATEsOnR501(StateMachine_c.getManySM_SMsOnR517(this));

    int v_count = -1;

    StateMachineState_c v_state = null;
    for (int i37214 = 0; i37214 < v_states.length; i37214++) {
      v_state = v_states[i37214];

      if (((v_state != null))) {

        v_count = v_count + 1;
      }

      if ((v_count == p_Index)) {

        return v_state.Get_ooa_id();
      }
    }

    return v_id;
  } // End getStateId
 public java.util.UUID Getruntimevalue(final java.util.UUID p_Stack_frame_id) {
   Ooaofooa.log.println(
       ILogger.OPERATION,
       "Transient Value Reference",
       " Operation entered: TransientValueReference::Getruntimevalue");
   final ModelRoot modelRoot = getModelRoot();
   return Gd_c.Null_unique_id();
 } // End getRuntimeValue
 // declare transform functions
 public Object Getvalue(final java.util.UUID p_Stack_frame_id) {
   Ooaofooa.log.println(
       ILogger.OPERATION,
       "Transient Value Reference",
       " Operation entered: TransientValueReference::Getvalue");
   final ModelRoot modelRoot = getModelRoot();
   return Gd_c.Null_instance();
 } // End getValue
  public boolean performFinish() {
    TransactionUtil.TransactionGroup transactionGroup = null;
    ModelRoot modelRoot = v_syncMessage.getModelRoot();
    try {
      transactionGroup =
          TransactionUtil.startTransactionsOnSelectedModelRoots(
              "Interface Operation Formalize"); //$NON-NLS-1$
      Message_c v_message = Message_c.getOneMSG_MOnR1018(v_syncMessage);

      InteractionParticipant_c v_participant =
          InteractionParticipant_c.getOneSQ_POnR1007(v_message);

      ComponentParticipant_c v_cop = ComponentParticipant_c.getOneSQ_COPOnR930(v_participant);

      if (((v_cop == null))) {

        v_cop =
            ComponentParticipant_c.getOneSQ_COPOnR930(
                InteractionParticipant_c.getOneSQ_POnR940(
                    Lifespan_c.getOneSQ_LSOnR930(v_participant)));
      }

      Component_c v_component =
          (Component_c)
              modelRoot.getInstanceList(Component_c.class).getGlobal(null, Gd_c.Null_unique_id());

      if (((v_cop != null))) {

        v_component = Component_c.getOneC_COnR955(v_cop);
      }

      if (((v_component != null))) {

        if (((v_Operation != null))) {

          if (v_syncMessage != null) {
            v_syncMessage.Formalizewithinterfaceoperation(v_Operation.getId());
          } else {
            Throwable t = new Throwable();
            t.fillInStackTrace();
            CorePlugin.logError("Attempted to call an operation on a null instance.", t);
          }
        }
      }

      // catch all exceptions and cancel the transaction
    } catch (Exception e) {
      if (transactionGroup != null) TransactionUtil.cancelTransactions(transactionGroup, e);
      CorePlugin.logError("Transaction: Interface Operation Formalize failed", e); // $NON-NLS-1$
      // return true so that the wizard will
      // close
      return true;
    }
    if (transactionGroup != null) TransactionUtil.endTransactions(transactionGroup);
    if (m_viewer != null) {
      if (m_viewer instanceof StructuredViewer) {
        ((StructuredViewer) m_viewer).refresh(v_syncMessage);
      } else {
        m_viewer.refresh();
      }
    }
    return true;
  }
  public boolean performFinish() {
    TransactionUtil.TransactionGroup transactionGroup = null;
    ModelRoot modelRoot = v_asyncMessage.getModelRoot();
    try {
      transactionGroup =
          TransactionUtil.startTransactionsOnSelectedModelRoots(
              "Instance Event Formalize"); //$NON-NLS-1$
      Message_c v_message = Message_c.getOneMSG_MOnR1018(v_asyncMessage);

      InteractionParticipant_c v_participant =
          InteractionParticipant_c.getOneSQ_POnR1007(v_message);

      Lifespan_c v_ls = Lifespan_c.getOneSQ_LSOnR930(v_participant);

      ClassInstanceParticipant_c v_cip =
          ClassInstanceParticipant_c.getOneSQ_CIPOnR930(
              InteractionParticipant_c.getOneSQ_POnR940(v_ls));

      ModelClass_c v_cipclass =
          (ModelClass_c)
              modelRoot.getInstanceList(ModelClass_c.class).getGlobal(null, Gd_c.Null_unique_id());

      if (((v_cip != null))) {

        v_cipclass = ModelClass_c.getOneO_OBJOnR934(v_cip);

      } else {

        v_cip =
            ClassInstanceParticipant_c.getOneSQ_CIPOnR930(
                InteractionParticipant_c.getOneSQ_POnR1007(v_message));

        if (((v_cip != null))) {

          Communication_c v_communication =
              Communication_c.getOneCOMM_COMMOnR1126(
                  ParticipantInCommunication_c.getOneCOMM_PICOnR1126(
                      InteractionParticipant_c.getOneSQ_POnR930(v_cip)));

          if (((v_communication != null))) {

            v_cipclass = ModelClass_c.getOneO_OBJOnR934(v_cip);
          }
        }
      }

      if (((v_cipclass != null))) {

        StateMachineEvent_c v_evt =
            StateMachineEvent_c.getOneSM_EVTOnR1009(
                EventMessage_c.getOneMSG_EOnR1019(v_asyncMessage));

        java.util.UUID v_existingId = Gd_c.Null_unique_id();

        if (((v_evt != null))) {

          v_existingId = v_evt.getSmevt_id();
        }

        StateMachine_c v_stateMachine =
            StateMachine_c.getOneSM_SMOnR517(InstanceStateMachine_c.getOneSM_ISMOnR518(v_cipclass));

        StateMachine_c[] v_machines =
            StateMachine_c.getManySM_SMsOnR517(
                InstanceStateMachine_c.getManySM_ISMsOnR518(
                    ModelClass_c.getManyO_OBJsOnR8001(
                        PackageableElement_c.getManyPE_PEsOnR8000(
                            Package_c.getManyEP_PKGsOnR1405(
                                SystemModel_c.getManyS_SYSsOnR1405(
                                    Package_c.getManyEP_PKGsOnR8000(
                                        PackageableElement_c.getManyPE_PEsOnR8001(
                                            v_cipclass))))))));

        if (((v_machines.length == 0))) {

          v_machines =
              StateMachine_c.getManySM_SMsOnR517(
                  InstanceStateMachine_c.getManySM_ISMsOnR518(
                      ModelClass_c.getManyO_OBJsOnR2(
                          Subsystem_c.getManyS_SSsOnR1(
                              Domain_c.getManyS_DOMsOnR1(
                                  Subsystem_c.getManyS_SSsOnR2(v_cipclass))))));
        }

        if (((v_Message != null))) {

          if (v_asyncMessage != null) {
            v_asyncMessage.Formalizewithevent(v_Message.getSmevt_id());
          } else {
            Throwable t = new Throwable();
            t.fillInStackTrace();
            CorePlugin.logError("Attempted to call an operation on a null instance.", t);
          }
        }
      }

      // catch all exceptions and cancel the transaction
    } catch (Exception e) {
      if (transactionGroup != null) TransactionUtil.cancelTransactions(transactionGroup, e);
      CorePlugin.logError("Transaction: Instance Event Formalize failed", e); // $NON-NLS-1$
      // return true so that the wizard will
      // close
      return true;
    }
    if (transactionGroup != null) TransactionUtil.endTransactions(transactionGroup);
    if (m_viewer != null) {
      if (m_viewer instanceof StructuredViewer) {
        ((StructuredViewer) m_viewer).refresh(v_asyncMessage);
      } else {
        m_viewer.refresh();
      }
    }
    return true;
  }