[[q_a]]

Questions/Answers, Tips and Tricks

About

What is the main purpose of the Firefly?

  • The most important is Quality, to gain a clear knowledge about the features and soundness of our systems.


Where the 'Firefly' name came from?

  • The green color/light often associated with the soundness.


Where the 'Weaveworld' name came from?

  • WW is a RAD platform to host distributed services (what are 'weaved' together).


Why the names of special files starts with '!.'?

  • These are auxiliary files, same as the Unix '.' hidden files, but these appear in directory listings.
    The code of the '!' precedes most of the characters, so these names are on the top of directory listings.


Can more users work with one licensed Firefly/WW installation/instance, e.g., with a started wwserver?

  • Practically, only in separate contexts' folders.


Why the server mode of the licensed Firefly is for, if there's no login/locking?

  • Using the server mode
    • processes can be controlled/traced and the results can be examined/presented from a browser even remotely (e.g., from a tablet).
    • during the development one can use the resources of two computers, one for the test execution and one for design/control.


Can I start more licensed Firefly/WW instance on one computer?

  • Yes, the license is for the computer.
  • Even, you can create more installation (in separate folders, e.g., /ww_dev, /ww_uat), copying the license file of the computer into the corresponding '!.java' subfolder.
    • It is also possible to create more starter scripts with different settings ('ww/!.java/wwserver_dev.sh', etc.)
  • Starting more instances from command line create separate Java Virtual Machines.
  • One can start more wwserver instances using different ports
    • e.g., ww/!.java/ww.sh --server:PORT (or --server-start:PORT for restart)
  • One installation is usually enough for one topic


Can more groups/developers work with one server computer with a licensed Firefly?

  • The suggested way is as follows:
    • Create separate users for every groups of developers
    • Copy the installation and the license files into each user's folder (e.g, ~/ww)
      • Using (Unix) links it is possible to use the same binaries, that would also mean central updates
    • Modify each '_ww' to use different ports
    • Allow each user to execute the shell scripts, e.g., to start/stop the server
    • Set a Network share for the context's folder
  • One installation is usually enough for one topic

Installation, Updates


Is it safe to give the MAC-addresses of my computers?


I'm afraid, that the update would mess my files.

  • You can zip or simply copy the whole 'ww' folder.
  • (It is important, that updates modify only the content of the 'ww/!.java/bin' folder.)
  • During the update, a backup zip file is created, so in case of errors one can restore the earlier state, simply overwrite the content of the 'ww/!.java/bin/lib' folder extracting the zip.
  • If there are still errors a brand new installation can be made using the old license and _settings file and copying the contexts.


Something strange happened with my files.

  • Copy or zip the whole ww/!.java folder (e.g., copy to ww/!.java.backup)
  • Remove all files from the 'ww/!.java' folder
  • Download and unzip the program to overwrite the 'ww/!.java' etc. folders
  • Copy your license key and the content of the _settings.* script
  • Make an _wwupdate
  • → Now your program is ready to work

Versions, Archives


What is the simplest way to archive the current state of Firefly and my work?

  • Just create a zip file.
  • In case of 'license-transfer' we ask you to remove the old license file from all the old locations.


What about CVS/SVN/Git?

  • It is suggested to put the WW 'contexts' under version control.
  • Preferable a context is about a project. So the project can be put under version control.
  • Even the core ('ww/!.java') folder of the Firefly/Weaveworld can be put under version control except the license file (use 'ignore').

Firefly and Eclipse

Can I handle my BPMN and additional files as an Eclipse project?

  • It is suggested to create an Eclipse project for the folder of the WW context
    • Create the folder for the WW context (e.g., 'example' in the '/ww' folder)
    • Select File / New / Project… / General / Project
    • Switch off the Default location
    • Choose the created folder
    • Copy the name of the folder (e.g., 'example') into the 'Project Name' field
    • Click Finish
    • → Now you can create a BPMN file selecting the New / Other… / BPMN2 / jBPM Process Diagram
  • Other files and subfolders of the project's folder can be managed from Eclipse, too

Firefly and Java


What are the '!.java' folders for?

  • These are analog to the WEB-INF folders of Java-enabled Web-Servers. For example, the Java classes from the 'classes' and 'lib' folders can be used in the scripts.


Can I start a BPMN process from Java/Maven/Ant/JUnit?

  • The simplest way is to create a JUnit test class and invoke the weaveworld.WW.start static method with the same arguments as the starter scripts.
  public static String HOME="--home:"+new File("c:/ww");
 
  @Test
  public void testJohn() throws Exception{
      once.data.Data result=weaveworld.WW.start( HOME, 
          "demo/hello.firefly.bpmn?name=John" );
      Assert.assertEquals("Hello John!", result.value());
  }


Can I start my JUnit tests from BPMN?

  • Create a Java environment for the context (e.g., put the jar files into the context's '!.java/lib' subfolder, including the jar of the junit), and write a Script Task like this:
var startTime=java.lang.System.currentTimeMillis();
var results=new org.junit.runner.JUnitCore().run( org.example.tests.MyTest.class );
var time=java.lang.System.currentTimeMillis()-startTime;
X.checkEquals( "Tests are OK", results.failureCount, 0 )

Firefly and Selenium


Can I use all the features of the Selenium WebDriver?

Testing


Can I use external data?

  • All the features of the Java platform can be used
    var lines = java.nio.file.Files.readAllLines(
                   java.nio.file.Paths.get("C:/temp/lines.txt"), 
                   java.nio.charset.StandardCharsets.UTF_8 );


I need a unique (or random) ID or name.

q_a.txt · Last modified: 2017/01/10 08:14 (external edit)
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0