Question

I'm trying to write a MWE2 workflow component using scala language.
Below is the scala code:

package com.ford.modelling.workflow

import org.eclipse.emf.mwe2.runtime.workflow.{IWorkflowComponent, IWorkflowContext}

class SayHello extends IWorkflowComponent {
  var message : String = null;

  def preInvoke {}
  def invoke(ctx : IWorkflowContext) { System.out.println(message) } 
  def postInvoke {}
}

and below is the workflow code:

module com.ford.modelling.workflow.SomeWorklow

SayHello {}

I can't figure out why does this workflow complain for error:

'com.ford.modelling.workflow.SayHello' does not have a public default constructor.

No correct solution

OTHER TIPS

I'd assume that the scala IDE plugin does not mimic the java protocol completely, e.g. the IType does not expose a no-args constructor. You may want to ask the scale folks about it.

The error message should vanish as soon as you add a default constructor explicitly. Does that make sense?

A quick google search indicated that there probably no syntax for a default constructor so I'd assume it's a scala tooling problem. Does the problem occur at runtime, too?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top