Created
April 11, 2010 22:23
-
-
Save edgars/363117 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.redhat.jbpmdemo.beans; | |
| import javax.persistence.EntityManager; | |
| import org.jboss.seam.ScopeType; | |
| import org.jboss.seam.annotations.AutoCreate; | |
| import org.jboss.seam.annotations.In; | |
| import org.jboss.seam.annotations.Name; | |
| import org.jboss.seam.annotations.Out; | |
| import org.jboss.seam.annotations.Scope; | |
| import org.jboss.seam.annotations.bpm.StartTask; | |
| import com.redhat.jbpmdemo.model.Contratada; | |
| @Name("ContratadaService") | |
| @Scope(ScopeType.CONVERSATION) | |
| public class ContratadaService { | |
| @In | |
| private EntityManager entityManager; | |
| @Out(scope = ScopeType.BUSINESS_PROCESS) | |
| private Long idContratada; | |
| @In(create = true) | |
| @Out(required = false) | |
| private Contratada contratada; | |
| @StartTask() | |
| public String complementaCadastro(){ | |
| contratada = entityManager.find(Contratada.class, idContratada); | |
| return "complementaCadastro"; | |
| } | |
| public String getDebug(){ | |
| contratada = entityManager.find(Contratada.class, idContratada); | |
| return "complementaCadastro"; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment