ssossossosso

Forums

Covering OroCRM topics, including community updates and company announcements.  Subscribe

This topic contains 3 replies, has 3 voices, and was last updated by  Alexander 2 years, 2 months ago.

  • Creator
    Topic
  • #11888

    cardiac
    Participant

    Hi,

    I want to create a task inside a workflow but don’t know how, because I think I need the activity manager?!

    Can you give me an example on how to do it?
    Perhaps it’s doable with a “create_entity” configuration…

    Thanks and

    regards

Viewing 3 replies - 1 through 3 (of 3 total)
  • Author
    Replies
  • #11889

    cardiac
    Participant

    I just wrote an CreateActivityEntity workflow action. Don’t know if it’s best practice but works for me.

    If somebody of you (especially the core devs is interested in this feature, I will add it to the WorkflowBundle with a PR

    #11910
    Yevhen Shyshkin
    Yevhen Shyshkin
    Oro Core

    Hello, cardiac.

    > I just wrote an CreateActivityEntity workflow action. Don’t know if it’s best practice but works for me.
    It’s quite good solution for this case.

    Another solution is to use internal function addActivityTarget (you can find this code at entity cache):

    /**
    * Associates the given entity with this entity
    *
    * @param object $target Any configurable entity that can be associated with this type of entity
    * @return object This object
    */
    public function addActivityTarget($target)
    {
    ...
    }

    #11912

    Alexander
    Participant

    Hi.

    Just create a task like this:

    and then call the method:

Viewing 3 replies - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.