Problems with my own workflow

Problems with my own workflow

Friday 10 December 2004 6:37:46 am - 6 replies

Modified on Wednesday 15 December 2004 12:48:34 am by Tore Skobba

Author Message

Eirik Alfstad Johansen

Wednesday 15 December 2004 5:52:56 am

Hi Tore,

I too have gotten the error msg "Undefined attribute 'type', cannot get" when I add a custom event type to my workflow. However, the workflow still runs fine. Also, I've had experience with workflows not returning variables to my templates, so that might be why your debug notices don't appear.

Could you try inserting for instance a mail() function in the execute function to make sure that the event is(n't) run?

Sincerely,

Eirik Alfstad Johansen
http://www.netmaking.no/

Tore Skobba

Wednesday 15 December 2004 6:18:42 am

Hi Eirik

Thanks for responding. In my execute I have:
<cod>eZDebug::writeNotice("Start","Workflow placeusers");
</code>

But I never see this debug message, neither when viewing the register page, or when viewing the post registration page. I have added the workflow and then connected it to content publish before/after. As I have from previously postings observed that it would also work for users.

Cheers
Tore

Eirik Alfstad Johansen

Wednesday 15 December 2004 6:31:51 am

Hi Tore,

Could you try out my suggestion: inserting a mail() function which sends an email to yourself in order to make sure that the event isn't run?

Sincerely,

Eirik Alfstad Johansen
http://www.netmaking.no/

Tore Skobba

Thursday 16 December 2004 1:55:01 am

Hi

Thanks Eirik, I tried to insert an mail function as shown below:

 function execute( &$process, &$event ) 
    {
		eZDebug::writeNotice("Start placeuserstyrpeexecute","Workflow placeusers");
		
		$mail = new eZMail();
		$mail->setReceiver("torecs@sfe.uio.no");
			
		eZDebug::writeNotice("receiver: $receivers_email","Workflow clubapplication");
			
		$mail->setSubject("test");
		$mail->setBody("Hei dette er meg");
		$headerArray[] = array( 'name' => 'Content-Type',
                             		'content' => 'text/html' );
		$mail->headers($headerArray);
		$mail->setSender("torecs@sfe.uio.no");
		$mailResult = eZMailTransport::send( $mail );
			
		eZDebug::writeNotice("receiver: $mailResult","Emailversand");
		
		return EZ_WORKFLOW_TYPE_STATUS_ACCEPTED;
    }		

I never get any mail (do you know why, my standard system mail is working fine cause I do get the new user registred email).. But I notice that if I enter something wrong in the above code, for instance not initalizing mail, then I get an error when the user registers in my workflow. So it seems to be executed... After searching my logs (files in log) I have can see my debug messages as weel, they are found in the notice.log. Why dosent they appear on screen.

Cheers
Tore

Eirik Alfstad Johansen

Thursday 16 December 2004 2:16:17 am

Hi Tore,

Perhaps it could be related to this bug which has just recently been fixed:

http://ez.no/community/bugs/workflow_results_are_ignored_in_content_edit_php

Sincerely,

Eirik Alfstad Johansen
http://www.netmaking.no/

Tore Skobba

Thursday 16 December 2004 3:04:34 am

Yes maybee, I am new to this workflow stuff.. I am just so glad that I am moving forward again.. Thank you very much Eirik.. You have really helped me here... I think my solution is, if I manage to make this workflow much more sustainable after I leave. Secondly, I think that learning how to make EZ workflows is going to hugely increase my possibilities with EZ.

However, again I have had huge problems with EZ due to poor docs... How was I to know that writenotice in my workflows did not write to the debug table in the browser.

Tusen Takk Eirik
Tore

You must be logged in to post messages in this topic!

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.